IBM i / AS400 application delivery instructions

Updated

Use this guide to deliver IBM i application source for CAST analysis. IBM i applications use libraries, source members and objects, or source stored in the integrated file system (IFS). Their delivery needs library and object context alongside the source.

For the platform concepts behind these instructions, see the Midrange Ecosystem.

Preparation and collection workflow

Use this guide to prepare your own application delivery or to coordinate collection on behalf of another team. Work with the relevant source, platform and database owners when their access or expertise is needed.

For each language or technology present, follow 1. Confirm → 2. Extract → 3. Package → 4. Check in its collection sheet below. Then apply 5. Keep the delivery current to the complete system/application using the refresh checklist at the end of this guide. Confirm the information in each checklist before collecting a full export. Record the responsible owner, files to collect, agreed baseline and any outstanding items in a delivery inventory.

First collect a representative program, its reusable source and its build/launch settings. Check that the sample opens correctly and that referenced members can be located, then collect the complete application baseline. Directory names below are examples. File extensions explicitly linked to analyzer documentation reflect that reference version; other extensions are packaging conventions to confirm in the target import configuration.

  1. Confirm scope and prerequisitesIdentify source owners, scope and dependencies.
  2. Extract a sampleExport source members or IFS files with verified CCSID conversion.
  3. Package the filesApply extensions, folders and the delivery manifest.
  4. Check and hand overValidate the sample, then collect the full baseline.
  5. Keep the delivery currentTrack each application baseline, refresh trigger and accepted analysis.

1. Identify the application

Record the IBM i release, compiler versions, application baseline, source CCSIDs, runtime library list and entry programs. Distinguish COBOL/400 and ILE COBOL and identify any OPM/ILE boundaries. List source libraries, source physical files, members and member types; for IFS source, record original paths.

IBM i belongs to the Midrange documentation family. Collect RPG and COBOL source together with the CL, DDS and Db2 for i dependencies they use. Check the Midrange coverage reference and the relevant analyzer version for supported language and screen/transaction features.

2. Collect each language and source family

Family, when present Deliver Additional context
COBOL/400 / ILE COBOL Application programs, COPY members, SQL includes and generated COBOL Compiler commands/options, COPY library lookup and source format
RPG RPG source, include members and SQL declarations Language version, fixed/free format and compile commands; confirm RPG analysis separately
CL / CLLE / CLP Application command source, called CL programs and command definitions Library list setup, file overrides, program calls and job submission commands
DDS Physical/logical file, display file and printer file source Record formats, object/library names and dependencies
SQL Db2 for i DDL, views, aliases, routine source and SQL scripts SQL naming convention, default schema and library/schema mapping
IFS scripts Application scripts, configuration and launch files Runtime paths and interpreter versions; confirm language coverage separately

IBM documents the ILE language families in its ILE overview external link. Collect all families actually used, including programs called from COBOL.

RPG

Analyzer reference: RPG / CL400 / DDS400 extension — includes the documented RPG and CL source families.

1. Confirm scope and prerequisites

Information to confirm Files and settings to collect or record
Which RPG version and fixed/free format are used? Record dialect/member types and confirm the appropriate analysis scope.
Which /COPY or /INCLUDE libraries and externally described files are used? Collect include members, library order and DDS/SQL record definitions.
Which SQL precompile commands and ILE service programs are required? Collect build commands, declarations and binding/interface source.

2. Extract a representative sample

Export application RPG and include members from IBM i source physical files, or IFS/SCM where maintained. Use the same member-to-stream-file workflow as COBOL, with CCSID conversion and library/member mapping. Include compile commands, SQL declarations and generated source.

3. Package the extraction

Keep rpg/source/ and rpg/includes/ separate, preserving native member types and original library/member identity. Deliver one artifact per file, with its type expressed by the extension. Use the following extensions for RPG source and copy members; confirm compatibility with the installed analyzer version.

Source type Conventional source file name Required source extension(s)
RPG III QRPGSRC .rpg, .rpg38, .sqlrpg
ILE RPG QRPGLESRC .rpgle, .rpgleinc
ILE RPG with SQL QSQLRPGLESRC .sqlrpgle
Copy source members QCPYLESRC .cpyle

These Q…SRC names are conventions, not mandatory locations; identify the actual source physical files in the application libraries. RPG III/IV can be autodetected; preserve the source type and fixed/free format. Do not combine source members into one delivered text file.

Verify the export before handover: Use UTF-8 (with or without BOM), or GB 18030 / BIG5 for Chinese environments. Check for unwanted characters introduced by conversion and preserve source layout. Extraction can introduce 12 leading numeric sequence columns; support is available from RPG Analyzer 3.5.2-funcrel. Check the installed version and actual sample before altering those columns; do not remove source characters blindly.

4. Check before collecting the full delivery

  • Open a representative exported file and verify its declared encoding, complete records and source format.
  • Locate the referenced application dependencies, or record each missing item with its responsible owner.
  • Confirm file recognition and analysis scope using the analyzer reference above.
  • Record the sample result, baseline, exclusions and outstanding requests in delivery-inventory.txt before collecting the full delivery.

COBOL/400 / ILE COBOL

Analyzer reference: Mainframe Analyzer — COBOL and copybooks; check platform/dialect limitations for the installed version.

1. Confirm scope and prerequisites

Information to confirm Files and settings to collect or record
Which compiler/version and source format build this application? Record dialect, fixed/free format, encoding and compiler options.
Where are COPY members found, and in what order? Obtain every application copybook, including shared/generated libraries; record ordered paths.
Is SQL or another preprocessor used? Obtain SQL includes/DCLGEN, schema definitions, preprocessor commands and generated source with provenance.
Which programs are entry points, dynamically called or supplied externally? Obtain launch definitions and called application source; list external or missing modules.
Which baseline represents the application to analyze? Record SCM revision or extraction date, source owner and excluded components.
Is this COBOL/400 or ILE COBOL, and where are the source members? Record source physical files/member types, compiler commands and any OPM/ILE boundaries.
Which files are externally described or overridden? Collect DDS/SQL definitions, record formats and file override commands.
Which library list and service programs are required? Collect runtime/build library order, binder source and application service-program linkage.

2. Extract a representative sample

  1. Ask for the libraries, source physical files, COBOL source members and COPY members, including members outside the main application library. Record member types and CCSIDs.
  2. Have the IBM i source owner export one source member per readable stream file using the site’s exporter or CPYTOSTMF external link, with conversion settings suited to those members. Export IFS-managed source directly from SCM/filesystem.
  3. Preserve the mapping library / source physical file / member and keep duplicate member names in separate directories. Ensure sequence/date metadata has not been inserted into program text.
  4. Collect compile commands, ordered COPY lookup/library context, file overrides, SQL includes and DDS for externally described files. Inspect a source sample before exporting the full set.

3. Package the extraction

Deliver one program per .cbl or .cob file and one copybook per .cpy file, unless the project uses another extension convention agreed with the receiver. Preserve original filenames and directory structure when the build relies on them; document any extension mapping instead of renaming files blindly.

cobol/programs/ORDERUPD.cbl
cobol/copybooks/CUSTOMER.cpy
cobol/generated/SQLCUSTOMER.cpy
build/compiler-options.txt
build/copybook-paths.txt

Record original path/member, delivered path, artifact role, encoding and baseline in delivery-inventory.txt. Preserve source columns and continuation lines. Include build and runtime configuration beside the source; compiled modules and listings do not replace it.

4. Check before collecting the full delivery

  • Open a representative exported file and verify its declared encoding, complete records and source format.
  • Locate the referenced application dependencies, or record each missing item with its responsible owner.
  • Confirm file recognition and analysis scope using the analyzer reference above.
  • Record the sample result, baseline, exclusions and outstanding requests in delivery-inventory.txt before collecting the full delivery.

CL / CLLE / CLP

Analyzer reference: RPG / CL400 / DDS400 extension — includes the documented RPG and CL source families.

1. Confirm scope and prerequisites

Information to confirm Files and settings to collect or record
Which commands establish the library list and override files? Collect setup/override source and runtime lookup order.
Which programs and jobs are called or submitted? Collect called application source and map submission commands to entry points.
Are application commands or service programs required? Collect command definitions and linkage context; identify product-supplied commands.

2. Extract a representative sample

Export application CL members and called CL programs from IBM i source files or SCM, retaining member/library identity. Include application command definitions, build commands, library-list setup and file override/job submission commands.

3. Package the extraction

Keep one source member per file under cl/source/, using the extensions below, and command-definition source under cl/commands/. Record member type and original identity, and confirm import recognition. Put job descriptions and schedule exports in operations/.

Source type Conventional source file name Required source extension(s)
CL QCLSRC .cl, .clp, .cl38, .clp38
ILE CL QCLLESRC .clle

Source physical file names are conventions; retain the actual library/file/member mapping. Deliver each CL artifact as a separate readable file.

4. Check before collecting the full delivery

  • Open a representative exported file and verify its declared encoding, complete records and source format.
  • Locate the referenced application dependencies, or record each missing item with its responsible owner.
  • Confirm file recognition and analysis scope using the analyzer reference above.
  • Record the sample result, baseline, exclusions and outstanding requests in delivery-inventory.txt before collecting the full delivery.

DDS and Db2 for i SQL definitions

Analyzer reference: RPG / CL400 / DDS400 extension for DDS; SQL Analyzer for SQL DDL. Db2 for i analysis is delegated to SQL Analyzer 3.5.4 or later; verify the installed versions. Deliver Db2 for i source alongside the RPG source as described below.

1. Confirm scope and prerequisites

Information to confirm Files and settings to collect or record
Which files are described by DDS and which by SQL? Collect the authoritative definition for every referenced object.
Do overrides or library lists redirect program file references? Obtain the logical-to-actual file mapping and record formats.
Which display/printer and database routine definitions belong to the application? Collect source/DDL and distinguish confirmed analyzer input from supporting context.

2. Extract a representative sample

Export DDS members for physical/logical files, display files and printer files from source physical files or SCM. Have the database owner generate readable SQL DDL for application schemas, tables, views and routines, including objects without maintained DDS source. For Query Management (QM) queries used by the application, use RTVQMQRY to retrieve the SQL into a source member, then export that member as readable source.

3. Package the extraction

Separate database/dds/physical/, database/dds/logical/, dds/display/ and dds/printer/. Use the DDS extensions below, including the 38 variants where applicable; these distinguish analyzer input types, not just packaging folders. Deliver SQL as .sql or .ddl, retaining library/schema/object identity. Include RPG and Db2 for i source together in the same delivered archive/source folder. Analysis creates separate RPG and Db2 Analysis Units and an automatic RPG-to-SQL dependency; verify that dependency after analysis.

Source type Conventional source file name Required source extension(s)
DDS display files QDDSSRC .dspf, .dspf38
DDS printer files QDDSSRC .prtf, .prtf38
DDS logical files QDBSRC .lf, .lf38
DDS physical files QDBSRC .pf, .pf38
SQL definitions and extracted queries Application-specific source location .sql / .ddl, according to the SQL artifact type

Deliver one artifact per file. Preserve the distinction between display, printer, logical and physical definitions through their extensions. Source physical file names are conventional; record the actual location.

4. Check before collecting the full delivery

  • Open a representative exported file and verify its declared encoding, complete records and source format.
  • Locate the referenced application dependencies, or record each missing item with its responsible owner.
  • Confirm file recognition and analysis scope using the analyzer reference above.
  • Record the sample result, baseline, exclusions and outstanding requests in delivery-inventory.txt before collecting the full delivery.

Optional application scripts in IFS

Collect only if used by this application. This is not a standard IBM i delivery requirement. Confirm whether application-owned scripts are maintained in the Integrated File System (IFS); skip this sheet when none are used. Collect native IBM i CL source through the CL / CLLE / CLP sheet. External automation on other hosts belongs in a separately identified integration scope.

Analyzer reference: Shell Analyzer for supported shell source; Python Analyzer for Python. Confirm other script families separately; a matching extension is not established by the filename alone.

1. Confirm scope and prerequisites

Information to confirm Files and settings to collect or record
Which interpreter/version runs each entry script? Record language, OS, runtime and launch command.
Which working directory, parameters and environment variables are required? Collect launch settings and configuration templates.
Which scripts, application modules and external commands are called? Collect application dependencies and identify external commands for scope assessment.

2. Extract a representative sample

Export only the application-owned scripts identified in IFS, or their maintained SCM source. Record the original IFS paths, interpreter/version, working directory and launch command. Include referenced application scripts and configuration templates. Do not collect unrelated platform scripts or installed runtime libraries.

3. Package the extraction

Preserve the actual source filenames and extensions (for example .sh or .py when those languages are used), including extensionless executable names. Keep directory structure and interpreter/shebang information. Put launch descriptions and scheduler exports in operations/; distinguish script source from logs and generated output.

4. Check before collecting the full delivery

  • Open a representative exported file and verify its declared encoding, complete records and source format.
  • Locate the referenced application dependencies, or record each missing item with its responsible owner.
  • Confirm file recognition and analysis scope using the analyzer reference above.
  • Record the sample result, baseline, exclusions and outstanding requests in delivery-inventory.txt before collecting the full delivery.

3. Export readable source

  1. Inventory application source members and referenced copy/include members. Preserve library, source physical file, member name and member type in a delivery manifest.
  2. Export one text file per member using the site’s source export tooling. IBM’s CPYTOSTMF command external link is one option for exporting a database member to a stream file; have the source owner select conversion settings appropriate to the source.
  3. Verify that the exported text contains complete source records, with the intended encoding and source columns. Keep source sequence/date metadata distinguishable from the actual code; avoid inserting it into program text.
  4. Keep identical member names from different libraries in separate folders. Record the lookup order rather than merging those files.
  5. Export IFS-managed source directly from SCM or the filesystem, preserving case and directories. Supply generated source and its inputs separately where needed.

Deliver source rather than compiled program objects or save files alone. IBM i source-member exports do not use z/OS PDS dump import settings.

4. Add build, database and runtime context

Deliver compile/create commands, binder source and binding-directory/service-program descriptions where they explain application linkage. Include the library list used to build and run the application, file overrides, job descriptions and environment settings relevant to source resolution.

For Db2 for i, include SQL DDL and DDS definitions that describe the application’s files and record formats. Preserve library/schema names and document SQL naming conventions. Include externally described file dependencies used by COBOL or RPG. Data records are not required for this source delivery.

For display/printer files, provide the source and identify it as context unless supported analysis has been confirmed. For operations, export native or external job schedules, submitted command chains and file-transfer scripts. Match scheduled commands to delivered programs and CL source.

ILE linkage and runtime setup

Analyzer reference: RPG / CL400 / DDS400 extension for documented CL/DDS relationships and Mainframe Analyzer for COBOL; binder/object reports remain context unless coverage is confirmed.

1. Confirm scope and prerequisites

Information to confirm Files and settings to collect or record
Which service programs, binding directories and exported entries are required? Obtain binder source, dependency descriptions and interface mappings.
Which library list and file overrides apply to this baseline? Collect ordered runtime/build setup and effective file mappings.
Which jobs or subsystems provide application-specific startup settings? Obtain the relevant job/launch configuration and source owner.

2. Extract a representative sample

Ask the build owner to export binder source, compile/create commands and application binding-directory/service-program descriptions. Capture ordered build/runtime library lists, file overrides, job descriptions and application environment settings as readable text. Source members can use the IBM i member-to-stream-file workflow; z/OS PDS dump settings do not apply.

3. Package the extraction

Keep binder source in build/binder-source/ with native member-type mapping, compile commands in build/compile-commands.txt and runtime settings under runtime/. Preserve original library/object identity and distinguish source from descriptive object reports.

4. Check before collecting the full delivery

  • Open a representative exported file and verify its declared encoding, complete records and source format.
  • Locate the referenced application dependencies, or record each missing item with its responsible owner.
  • Confirm file recognition and analysis scope using the analyzer reference above.
  • Record the sample result, baseline, exclusions and outstanding requests in delivery-inventory.txt before collecting the full delivery.

Messaging and external services

Analyzer reference: Mainframe Analyzer for documented messaging references in COBOL. Product resource exports and other client languages require separate coverage confirmation.

1. Confirm scope and prerequisites

Information to confirm Files and settings to collect or record
Which queues or external services does the application call? Collect scoped definitions and name/endpoint mappings.
Where are message layouts and routing names maintained? Collect layouts and application routing configuration.
Are destinations dynamically selected or externally owned? Document name construction and application boundaries.

2. Extract a representative sample

Ask the service/messaging owner for readable application-scoped resource definitions, aliases and endpoint mappings. Export application message layouts and service configuration from SCM or supported product tooling. Keep native product exports as direct files; do not wrap filesystem or repository exports in a PDS dump.

3. Package the extraction

Use messaging/definitions/ and runtime/services/ for native readable configuration and the normal language folders for message layouts. Record product/version, logical names and external ownership in the manifest. Confirm whether the files are supported analyzer inputs or context.

4. Check before collecting the full delivery

  • Open a representative exported file and verify its declared encoding, complete records and source format.
  • Locate the referenced application dependencies, or record each missing item with its responsible owner.
  • Confirm file recognition and analysis scope using the analyzer reference above.
  • Record the sample result, baseline, exclusions and outstanding requests in delivery-inventory.txt before collecting the full delivery.

5. Package the delivery

ibmi/
  delivery-inventory.txt
  source/LIBRARY/SOURCEFILE/
  ifs-source/
  build/compile-commands.txt
  build/binder-source/
  database/sql/
  database/dds/
  runtime/library-list.txt
  runtime/file-overrides.txt
  operations/

Use recognizable file extensions or document member-type mappings for import configuration. The inventory should map each delivered file to its original member or IFS path, record the application baseline and list missing dependencies. Keep supporting object reports separate from source.

6. Check before handover

  • COBOL programs and all application COPY members are present or listed as missing.
  • Called CL/RPG/other programs are delivered and their analysis scope is identified.
  • Source member identity, encoding, library lookup order and build commands are recorded.
  • DDS/SQL record and object names match program references, with file overrides explained.
  • Schedule entries and command chains match delivered entry programs.
  • Representative samples cover COPY resolution, externally described files and SQL where used; unsupported screen/transaction behavior is identified.

7. Keep the delivery current

Workflow step 5 — repeat per system/application. After the first accepted delivery, maintain a separate refresh record for each application and environment. A change starts the next Confirm → Extract → Package → Check → Keep current cycle; it does not require requalifying unchanged scope from scratch.

Action What to do for the next delivery
Identify the baseline Record the system/application, environment, release/tag or source snapshot, extraction date and previous accepted delivery. Keep independent applications and environments identifiable.
Agree a refresh trigger Refresh at an application release, a significant source/build/runtime/data-definition change, or an agreed cadence. Record the trigger and responsible owner.
Refresh the complete scope Include current reusable source and relevant database, transaction, file and job definitions, not only changed programs. Preserve shared-library lookup order and document any metadata extracted at a different time.
Handle additions and deletions Use a complete current snapshot by default. Use incremental delivery only when the receiving process explicitly supports it and defines how to reconcile changed, added, renamed and deleted files/objects.
Revalidate the procedure Reuse the approved extraction procedure and settings. Recheck encoding, recognition, counts and dependencies; repeat a representative sample when source format, exporter, import settings or analyzer version changes.
Track acceptance and analysis Distinguish the latest prepared/delivered baseline, the latest accepted baseline and the latest successfully analyzed baseline. Record dates, results and unresolved items; a transferred archive alone does not confirm a successful analysis.
Maintain ownership Name who runs/maintains extraction, who receives/validates the delivery and who resolves missing source or failed exports. Keep the procedure and change history with the team’s normal delivery records.

Example: after delivery of release R1, a new R2 release changes a program, shared include and database definition. Collect the current application snapshot and matching dependencies/definitions, validate and deliver it as R2. Keep R1 as the last successfully analyzed baseline until R2 analysis succeeds; record failures or outstanding items against R2 rather than assuming the graph is current.

Use an existing manifest, release record or delivery ticket to track this cycle. The optional inventory note below explains one possible handover format.

Why keep a delivery inventory?

A delivery inventory is a recommended handover aid. It explains what was collected so the person preparing or analyzing the delivery can:

  • Trace the files: map exported paths back to source libraries and members, distinguish same-named members, and identify program, copybook or definition roles.
  • Check completeness: compare expected and delivered counts, identify missing dependencies and exclusions, and record who can resolve outstanding items.
  • Interpret and repeat the export: record the source baseline, extraction date, encoding, Easy/Advanced route where applicable, and import settings so later deliveries can be compared.

delivery-inventory.txt is an example filename proposed by this guide, not a required CAST input or prescribed format. Reuse an existing manifest, README, spreadsheet or delivery ticket if it contains the relevant information. Keep it alongside the delivery as supporting documentation, separate from source selected for analysis. Build/runtime settings are also supporting context to include where relevant to source interpretation or dependency resolution.

Return to Midrange Expected Input.