All systems

AS/400 (IBM i)

IBM i text exports (CPYTOIMPF)
Supported
Guide

IBM AS/400 (now IBM i) is a midrange computer system widely used in enterprise environments, with an integrated database (DB2 for i). DataMeans reads IBM i data from delimited text exports made with CPYTOIMPF.

What You Can Upload

  • Delimited text exports (.csv, .txt) made on the IBM i with CPYTOIMPF, in EBCDIC or ASCII
  • A ZIP archive of those exports

Save files (SAVF, made with SAVOBJ) and raw physical-file dumps are binary and can't be read, and DDS source isn't parsed. If you upload a save file, DataMeans says so and shows you how to export instead.

What You Get Out

DataMeans converts your data into multiple modern formats:

OutputDescription
csv/{TableName}.csvOne CSV file per table with all row data
xlsx/{TableName}.xlsxExcel workbook per table (omitted for tables over 1,048,575 rows, 16,384 columns or 8,000,000 cells - see note below)
xls/{TableName}.xlsLegacy Excel format per table (omitted for tables over 65,535 rows, 256 columns or 150,000 cells - see note below)
json/{TableName}.jsonJSON array of records per table
json/{TableName}.jsonlNewline-delimited JSON (streaming-friendly)
postgres.sqlPostgreSQL CREATE TABLE + INSERT statements
mysql.sqlThe same schema and rows, in MySQL dialect
sqlite.sqlThe same schema and rows, in SQLite dialect
ansi.sqlThe same schema and rows, in portable ANSI SQL
sqlserver.sqlThe same schema and rows, in SQL Server (T-SQL) dialect
report.jsonStructured conversion report
report.mdHuman-readable conversion summary

How to Export / Obtain Files

  1. On IBM i, export each physical file to delimited text with CPYTOIMPF, for example CPYTOIMPF FROMFILE(MYLIB/MYFILE) TOSTMF('/tmp/myfile.csv') DTAFMT(*DLM) ADDCOLNAM(*SYS)
  2. ADDCOLNAM(*SYS) writes a header row of column names. CPYTOIMPF's default writes none, and then the columns come through as COL_1, COL_2 and so on
  3. Transfer the exported files to your computer (by FTP or IBM i Access)
  4. Create a ZIP archive containing the files, or upload a single file directly
  5. Upload the file or ZIP archive to DataMeans

Supported Features

  • One table per exported file
  • EBCDIC or ASCII text
  • Fields delimited by commas, semicolons, tabs or pipes (whatever FLDDLM was set to), quoted or not
  • A header row is used when the export has one; DataMeans checks rather than assumes, so no data row is ever taken for a header
  • A preview of every file before you convert: its columns (typed from its values), the first rows, and a count of its records. The preview reads the start of each file, so the count of a large file is an estimate from its size

Known Limitations

  • Save files and physical-file dumps can't be read: export to text first
  • DDS source isn't parsed, so column types come from the exported values: whole numbers, decimals, ISO dates and CPYTOIMPF's timestamps (2024-01-15-13.45.00.000000); a code with leading zeros stays text
  • Times in the *ISO form (13.45.00) stay text, because a *DMY date with a "." separator (15.01.24) looks the same; dates in *MDY, *DMY or *USA form stay text too, since the text does not say which number is the day
  • Logical files (views) aren't converted; export the physical files they're built on

Troubleshooting

IssueSolution
"SAVF" or binary-file messageExport the file to text with CPYTOIMPF (see above)
Columns named COL_1, COL_2, ...Re-export with ADDCOLNAM(*SYS) to include column names

Note on the Excel formats. An .xlsx sheet holds at most 1,048,575 rows of data and 16,384 columns, and a legacy .xls sheet 65,535 rows and 256 columns. Rather than ship a file that looks complete but is silently cut short, DataMeans leaves a table out of any Excel format it does not fit and notes it in the job report. The .xlsx copy is also left out for tables of more than 8,000,000 cells (1,048,575 rows of 12 columns is 12.6 million), which take too long and too much memory to write, and the .xls copy for tables of more than 150,000 cells, which the legacy format takes far too long to write. The CSV, JSON and SQL outputs always contain every row.

Technical reference

Overview

AS/400 (now IBM i) is an integrated business computer system developed by IBM, featuring a built-in relational database called Db2 for i. The system uses a proprietary object-based architecture where all resources (files, programs, devices) are treated as objects. The database supports both traditional record-oriented access and modern SQL, with advanced features like journaling, commitment control, and referential integrity.

History and Background

  • 1988: AS/400 announced in June as successor to System/36 and System/38; first systems shipped in August with OS/400.
  • 1994: AS/400 Advanced Series models introduced; integrated database named DB2/400.
  • 1995: Product line moved to 64-bit PowerPC AS (RISC) processors.
  • 2000: Renamed to eServer iSeries as part of IBM's eServer branding initiative.
  • 2004: eServer i5 systems introduced with POWER5 processors; OS/400 renamed i5/OS.
  • 2006: Renamed to System i.
  • 2008: System i and System p merged into IBM Power Systems; i5/OS renamed IBM i with release 6.1.
  • 2019: IBM i 7.4 released, introducing Db2 Mirror for i.
  • 2022: IBM i 7.5 released with security enhancements and a BOOLEAN SQL data type.

File Format Specifications

Database Objects:

  • Physical files: Tables containing data records
  • Logical files: Views and indexes over physical files
  • Source physical files: Program source code storage
  • Display files: User interface definitions
  • Printer files: Report output specifications

File Structure:

  • Record format level identifiers for compatibility
  • Field-level descriptions with data types and attributes
  • Access paths defined through logical files
  • Member concept allows multiple data sets per file
  • Integrated file system (IFS) for stream files

Storage Architecture:

  • Single-level store architecture
  • Db2 for i integrated database
  • Object-based security model
  • Journaling for audit trails and recovery
  • Commitment control for transactions

Data Types and Structures

TypeSizeDescription
CHARFixedFixed-length character strings
VARCHARVariableVariable-length character strings
GRAPHICFixedFixed-length double-byte strings
VARGRAPHICVariableVariable-length double-byte strings
BINARYFixedFixed-length binary data
VARBINARYVariableVariable-length binary data
SMALLINT2 bytes16-bit signed integers
INTEGER4 bytes32-bit signed integers
BIGINT8 bytes64-bit signed integers
DECIMALVariablePacked decimal numbers
NUMERICVariableZoned decimal numbers
FLOAT4/8 bytesSingle/double precision floating point
DATE4 bytesDate values (YYYY-MM-DD)
TIME3 bytesTime values (HH:MM:SS)
TIMESTAMP7-13 bytesDate and time with fractional seconds
BLOBVariableBinary large objects
CLOBVariableCharacter large objects
DBCLOBVariableDouble-byte character large objects

Database Features:

  • Referential integrity constraints
  • Check constraints and triggers
  • User-defined functions and procedures
  • Materialized query tables
  • Row and column access control

Version Differences

VersionYearKey FeaturesOS Branding
V1R11988First release; integrated relational databaseOS/400
V3R11994Referential integrity, triggers; DB2/400 nameOS/400
V4R11997AS/400e series; e-business focusOS/400
V4R41999Logical partitioning (LPAR)OS/400
V5R12001Linux in secondary logical partitionsOS/400
V6R12008POWER6 processor supporti5/OS, renamed IBM i
7.12010XML data type; Technology Refresh modelIBM i
7.22014Row and column access control (RCAC)IBM i
7.32016Temporal tables, authority collectionIBM i
7.42019Db2 Mirror for iIBM i
7.52022Security enhancements, BOOLEAN typeIBM i

Compatibility Notes:

  • Record format levels ensure application compatibility
  • SQL access available alongside native I/O
  • Some features require minimum OS levels
  • Migration tools available for hardware upgrades
  • Backward compatibility maintained for business applications

Technical References

Questions

What can I convert AS/400 (IBM i) databases to?

DataMeans converts AS/400 (IBM i) databases to clean CSV, Excel, JSON & SQL. Each table is exported as its own file, alongside a structured report of exactly what was extracted.

Do I need AS/400 (IBM i) installed to open my databases?

Only to make the export. DataMeans reads delimited text exports made on the IBM i with CPYTOIMPF, not save files (SAVF) or the physical files themselves, so you need access to the system once, to export. After that, you don't need the IBM i.

Can I preview my AS/400 (IBM i) data before paying?

Yes. DataMeans shows your extracted tables and rows in the browser first, so you only pay when you're ready to download the full CSV, Excel, JSON & SQL export.

Is my data secure?

Yes. Your files are encrypted in transit and at rest, and they're deleted automatically: within 7 days if you don't go ahead with a conversion, and when your download window ends if you do. We never sell or share your data, and we never use it to train machine-learning models.