Dataset
IBM i (AS/400) Db2 file and source member datasets for AI training
An IBM i dataset is an extract of chosen libraries from a business's IBM i system, still widely called AS/400 or iSeries: the Db2 for i physical files behind its ERP, distribution, banking or insurance application, their DDS field descriptions and the RPG, COBOL and CL source members of the programs that maintain them. SourceX sources it to a buyer's spec from established businesses that run IBM i. Each dataset is de-identified, including customer and account data, and licensed for an agreed permitted use.
Dataset manifest
Sourced to your spec- What it is
- Rows of chosen physical files with their field descriptions, plus the source members of the programs that read and write them
- Typical systems
- IBM i, on the platform earlier sold as AS/400, iSeries and System i: Db2 for i files defined in DDS or SQL, RPG, COBOL and CL source, and journals and spooled files where in scope
- Typical history
- Set by the application's own purge and archive jobs; row-level changes only where the file was journaled and receivers were kept
- Modality
- Fixed-layout database rows, source code members and print-image reports
- Delivery formats
- Parquet or delimited UTF-8 per file and member, a field dictionary, and source members as text with line dates
- Preparation
- EBCDIC converted to UTF-8 and packed and zoned decimals to numbers; customer and account data removed or replaced with stable pseudonyms
- Licensing
- Scoped per library, file and date range; permitted use agreed per license; rights in any packaged application's source checked
- Availability
- Sourced to your spec; depends on what the business owns and can extract, and supply is not guaranteed
What a delivery contains
Fields vary by source system and are fixed per order. A typical delivery includes:
| Field | Type | What it holds |
|---|---|---|
| library | string | The library the object was extracted from, IBM i's container for files, programs and source. |
| file_name | string | System name of the physical file, with its longer SQL name where the table was created with SQL. |
| member | string | The member of the physical file the row came from; one file can hold several members. |
| file_attributes | object | Whether the file is DDS-described, SQL-defined or program-described, with its record format, keys and logical files, from DSPFD and DSPDBR output. |
| field_dictionary | array | Each field's system name, type, length, decimals, CCSID, text and column heading, as DSPFFD or the QSYS2.SYSCOLUMNS catalog view reports them. |
| row | object | The record's field values under their system names, converted from EBCDIC, packed and zoned storage to text and numbers. |
| decoded_dates | object | Parsed dates for fields held as numbers, with the format rule applied; the stored number stays in row. |
| conversion_flags | array | Fields in this row that failed conversion, such as invalid decimal data or untranslated CCSID 65535 bytes. |
| journal_entries | array | Where journal receivers are in scope, the row's entries by journal code and entry type, with after images and, where the file was journaled with both, before images, as DSPJRN returns them. |
| program_refs | array | Programs that refer to the file and how they use it, from DSPPGMREF output, each with its source physical file, such as QRPGLESRC, and member. |
| source_member | object | For source deliveries, a member's name, source type such as RPGLE, CLLE, PF or DSPF, and each line with its sequence number and change date. |
| extract_route | object | How the rows left the system: SQL over ODBC or JDBC, a data transfer or CPYTOIMPF, with the job CCSID and the members read. |
Field names from the table above; values are masked placeholders.
Example record
{
"library": "WHSDTA",
"file_name": "ORDLIN",
"member": "Y2024",
"file_attributes": {
"described_by": "DDS",
"record_format": "ORDLINR",
"keys": [
"OLORD#"
],
"journaled": true
},
"field_dictionary": [
{
"name": "OLORD#",
"type": "PACKED",
"digits": 7,
"decimals": 0,
"text": "Order number"
},
{
"name": "OLSHDT",
"type": "ZONED",
"digits": 7,
"decimals": 0,
"text": "Ship date"
},
{
"name": "OLSTS",
"type": "CHAR",
"length": 1,
"ccsid": 37,
"text": "Status"
}
],
"row": {
"OLORD#": 4418207,
"OLSHDT": 1240315,
"OLSTS": "S"
},
"decoded_dates": {
"OLSHDT": {
"value": "2024-03-15",
"rule": "CYYMMDD"
}
},
"conversion_flags": [],
"journal_entries": [
{
"code": "R",
"type": "UB",
"at": "2024-03-15T16:42:10Z",
"OLSTS": "P"
},
{
"code": "R",
"type": "UP",
"at": "2024-03-15T16:42:10Z",
"OLSTS": "S"
}
],
"program_refs": [
{
"program": "ORD310",
"source_file": "QRPGLESRC",
"member": "ORD310",
"usage": "update"
}
],
"extract_route": {
"method": "sql_jdbc",
"job_ccsid": 37
}
}Synthetic record for illustration. Field names, structure and format are agreed per order.
What AI teams use it for
Train coding agents on RPG, COBOL and CL
Source arrives with the files it maintains, so record operations can be checked against real layouts and rows.
Practice modernization
DDS to SQL tables, fixed-form to free-form RPG and native record access to SQL, with real data to test equivalence on.
Infer meaning from cryptic schemas
A model learns what a short field name means from field text, screen labels and program logic.
Model long transaction histories
Years of orders, shipments or account postings in one stable layout suit forecasting and anomaly detection.
Evaluate data conversion agents
Packed fields, numeric dates and multi-member files make conversion tasks with checkable answers.
Use-case guides: Coding agents, Enterprise and computer-use agents, Finance and accounting agents, Private evaluation sets
What makes this data valuable
Source matches the running programs
The source file and member recorded on each program or module object agree with the members delivered.
Every member extracted
Row counts per member reconcile with the file description.
Field text filled in
DDS text and column headings are populated, or a field reference file is delivered.
Display and printer files included
Screen and report DDS gives the labels users saw beside each field.
Application written in house
The business wrote and owns the source.
Journal receivers kept
Archived receivers, ideally with both before and after images, extend the data from current state to row-level change history.
Document stack
IBM i dataset
On IBM i the meaning of a column lives in DDS and RPG
On IBM i, Db2 for i is part of the operating system, and a table is an object called a physical file, kept in a library. Programs traditionally read it one record at a time with native operations such as CHAIN and READE in RPG, through logical files that supply keyed access paths. Many files were defined in DDS, whose field names are short and upper case, often with a two-letter prefix per file, such as OLSTS or OLSHDT, and carry a line of text only if the programmer supplied one. DDS fields usually do not allow nulls, so blanks and zeros stand for missing values, and foreign keys are rarely declared, because the programs enforce them.
Many applications predate the native date type, so dates are plain numbers: year, month and day, or month first, or a century digit in front of a two-digit year, often with zero or all nines meaning open-ended. One-character status codes take their meaning from the RPG that sets them. The oldest files are program-described: the system knows only a record length, and the layout exists in the input specifications of RPG programs. This is why source members must travel with the data. The DDS member defines the file, display file DDS shows the label a user saw beside each field, and the RPG, COBOL and CL show how each value is validated and changed. DSPPGMREF lists the files each program refers to and whether it reads, writes or updates them, as recorded when the program was created, so each file can be paired with its programs.
An RPG UPDATE overwrites the record in place. Row changes survive in journals, with the job, user and program on each entry, but a file is journaled with after images only unless both were asked for, and receivers are routinely saved and deleted. Source members carry a change date on every line, a coarse history of the code where no version control existed. A program object, or for ILE each of its modules, records the source file and member it was created from, which lets a buyer check that the source delivered is the source that runs.
What an extract returns from EBCDIC, packed decimals and members
The native way to move a library is to save it into a save file or onto tape, and that restores only on another IBM i. The bytes are EBCDIC characters under a CCSID, with numbers as packed decimal, two digits to a byte with the sign in the last half byte, or as zoned decimal. The usable routes are SQL through the ODBC or JDBC drivers or the data transfer in IBM i Access Client Solutions, which convert each field by its definition, and CPYTOIMPF, which copies one named member, or all of them, to a delimited stream file in a chosen CCSID.
A physical file can hold several members with one layout, one per year or per company, and SQL reads only the first unless an alias or an override names another, so a simple extract silently delivers one member. Character fields tagged CCSID 65535 are treated as binary, and drivers return them as hex unless told to translate. Native programs can leave blanks or other invalid bytes in packed and zoned fields. SQL then raises a data mapping error on those rows, and depending on the extract tool the result is a failed job, a null or a missing row.
To test a sample, compare row counts per member with the record counts DSPFD reports. Look for hex strings in character fields and for zero or all-nines dates that a converter turned into nulls. Pick a few fields with opaque names and find their meaning in the delivered DDS and programs. Then check that every file named in a delivered program is delivered or listed as out of scope.
What to check before licensing
- Have the data owner and your counsel check IBM's terms on exported data and API use, and the license of any packaged application on the system, for the use you intend.
- Ask whether the files and programs belong to a packaged application whose vendor restricts use of its data model or source, and which parts are the business's own.
- Check de-identification of customer and account data, including names in free-text fields, keys built from account numbers and values in spooled reports.
- Ask for each file's member list from DSPFD and reconcile delivered row counts per member against it.
- Ask how rows were extracted and under which job CCSID, and how CCSID 65535 fields and rows with invalid decimal data were handled.
- Confirm the source members delivered are those the production programs were compiled from, using the source file and member recorded on each program or module object.
- Pick ten fields with opaque names and trace each to its meaning through DDS text, a display file label or program logic.
Delivery No files move before a signed license. A listing or a request grants no files by itself.
How licensing works through SourceX
- 1
Define
Send the domain, modality, volume, format, timeline and permitted use you need.
- 2
Source
SourceX identifies businesses that hold matching data and are open to licensing it.
- 3
Qualify
Fit, rights and quality are checked, and you review samples before committing.
- 4
License
Scope, permitted use, exclusivity, price and obligations are agreed in writing.
- 5
Deliver
Approved data is prepared, de-identified where required and transferred securely.
Questions Acquisition Partners ask
Why do RPG and DDS source members have to come with the data?
Because the files do not explain themselves. Field names are short codes, dates are numbers in formats the programs decide, and status codes and business rules live in RPG, COBOL and CL logic, not in database constraints. The DDS members, display files and programs supply what the rows leave out.
Can a library be delivered as an IBM i save file?
Not usefully, unless you run IBM i yourself. A save file restores only onto another IBM i system, and the data inside is EBCDIC with packed and zoned decimal fields. A dataset for AI work is extracted through SQL or copied to delimited files, with characters converted to UTF-8 and numbers to plain decimals.
How are numeric dates and packed decimals handled?
A sound delivery converts them and keeps the stored values. Packed and zoned decimals become ordinary numbers with their declared decimal places. Specify that dates held as numbers arrive as the stored number and as a parsed date, because formats differ between files and zero or all-nines values carry meaning. Rows with invalid decimal data should be flagged, not dropped.
Is there a history of changes to each row?
Only where the file was journaled and the journal receivers were kept. A physical file holds the current state of each record, and an update overwrites it. Journals record each add, update and delete, with after images by default and before images only where both were requested, and many shops delete receivers once saved. Ask how far back retained receivers go.
What if the system runs a packaged ERP, banking or insurance application?
Then rights need closer review. Whether the business may share a packaged application's file layouts, field definitions and source code depends on its license from the software vendor, even where the transaction records are the business's own. Ask which libraries hold vendor code and which hold the business's own modifications, and have counsel review the vendor's terms before scoping.
Is SourceX affiliated with IBM?
IBM i (AS/400) is named to identify the system the records come from. That does not imply a partnership with or endorsement by IBM. The records belong to the business that runs IBM i (AS/400), which licenses them under a signed agreement, and a request does not guarantee a matching dataset. Buyers should still confirm with counsel that the vendor's terms allow the intended use of exported data.
Related datasets
- Retired-system and migration exports
One retired system's final export with its migration's mapping, scripts, load results and reconciliations
- Legacy and rare-language codebases
Private production code in under-represented languages, with copybooks, job control, data definitions and change history
- Relational business database exports
Populated relational databases from business applications, with schema, keys, constraints, code tables and a data dictionary
- ERP transaction histories across modules
One company's ERP documents across modules, with flow links, change logs, master data and the data dictionary
- IBM z/OS mainframe data sets
Chosen Db2 tables, VSAM and sequential data sets and IMS segments, decoded, with their copybooks and JCL
Evaluating this data for procurement?
Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.
Request dataset diligenceTell us what your models need
Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.
Updated 26 November 2026.