IBM i / AS400 label printing: RPG programs, DB2 for i and spool files
Modernize label printing from IBM i (AS/400) without rewriting RPG or CL: ODBC to DB2 for i, spool and export files, TCP socket and REST from ILE programs — with scenarios and a checklist.
Plenty of plants still run on IBM i: decades-old RPG programs that have printed labels through spool files and a dot-matrix or a single Zebra since the 1990s. The programs work; the printers and formats are what changed. EtikStudio lets those programs keep doing exactly what they do while the labels come out on modern thermal printers of any brand.
Which integration paths fit IBM i
| Path | Fit | Why |
|---|---|---|
| Embedded data (ODBC to DB2 for i) | Best | The IBM i Access ODBC driver exposes physical files and SQL views; the label reads item, lot and order data by key at print time. |
| Watched folder (IFS / FTP) | Best | The RPG or CL program writes a CSV to the IFS or a shared folder instead of the spool; EtikStudio prints it. Minimal change to the program. |
| TCP socket | Good | Programs that already send to an IP and port (legacy printer streams) target EtikStudio's socket listener instead. |
| REST from ILE | Modern | RPG free-form with HTTPAPI or SQL HTTP functions calls the REST API for immediate job status. |
Typical scenarios
| Process | Label | Trigger |
|---|---|---|
| Production | Container and finished-goods labels with lot | Production reporting program |
| Shipping | Pallet SSCC and customer labels replacing spool output | Shipment confirm program |
| Inventory | Location and cycle-count labels | Location maintenance |
| Receiving | PO receipt labels with vendor lot | Receipt entry |
Recommended flow
Do not rewrite the RPG. Redirect its output: where it wrote a spool file, write a CSV to the IFS; where it opened a socket to the old printer, point it at EtikStudio. The label design — now GS1-128, SSCC, customer formats — lives in EtikStudio and reads the rest from DB2 for i views. When the plant buys a new printer brand, only the printer profile changes.
Implementation checklist
- Install the IBM i Access ODBC driver on the EtikStudio host and request read-only SQL views (not direct file access).
- Capture a sample of the current spool or socket output to identify the fields each program emits.
- Mind EBCDIC/ASCII conversion when writing to the IFS; use CCSID 1208 (UTF-8) for accented text.
- Keep the old printer reachable during the transition; both outputs can run in parallel.
How EtikStudio handles it
The IBM i program keeps its logic; EtikStudio provides the modern label, the barcode standards and the printer independence, with a print log per job for the audits the old spool never had.
Integration details vary by ERP version, deployment and licensing. Adapters and worked examples are provided during implementation.