Creating linkage source files for IBM i dependency builds

On IBM® i systems, linkage source files are needed for dependency builds. You can automatically generate the required files by running the Qshell utility on your program libraries.

About this task

You can use the utility that is provided with the build toolkit for these tasks:
  • Preparing i Projects for the first dependency build
  • Disassembling and analyzing the Integrated Language Environment® (ILE) program bindings

The utility scans the input library that you specify for ILE programs (PGMs) and service programs (SRVPGMs) that are already compiled and linked. The utility generates a set of source physical file members for each ILE program and service program that it scans. Each generated output member contains the source for a small CL program, which is an IBM i script language, to re-create that ILE program or service program. The output member type is PGMSRC for PGMs or SRVPGMSRC for SRVPGMs.

You can add the PGMSRC and SRVPGMSRC members and other source files to i Projects that use the Remote System Explorer (RSE) feature of Rational® Developer for i. Then, you can deliver the i Project files to Engineering Workflow Management source control. The Engineering Workflow Management source code data (SCD) scanner can read the PGMSRC and SRVPGMSRC members to track the binding dependencies that are required for dependency builds. The PGMSRC and SRVPGMSRC members include the metadata that the dependency builds need to maintain the binding relationships between the ILE programs after they are compiled from source.

If you must change the bindings later, for example, to add a module to a service program, the corresponding SRVPGMSRC member in the i Project can be edited to reflect this change and delivered in a change set like any other source change.

The following diagram shows the task sequence to generate the linkage files and deliver them to source control. Diagram that shows the changes that result when you run the Qshell utility on a program library and then add the generated source files to an i Project and deliver the changes to a Engineering Workflow Management repository.


  1. From Qshell, go to /QIBM/ProdData/RTC_version/Build/jazz/buildsystem/buildtoolkit/scripts/
    Replace RTC_version with your Engineering Workflow Management version, for example, RTC404 or RTC405.
  2. Type this command: -inLib=libname -inObj=program -outFs=qsys -outLib=libname -objType=*PGM -workLib=libname -replRefLib=libl                                                    
    Replace the following parameters in the code with your information:
    Where LIBNAME is a library that contains *PGMs or *SRVPGMs to be scanned for their bindings.
    -inObj={*ALL | OBJNAME}
    The default is *ALL. Where OBJNAME is a specific *PGM or *SRVPGM name for which bindings must be generated. You can use*ALL to generate bindings for all *PGMs or *SRVPGMs in the -inLib library.
    -outFs={qsys | ifs}
    The default is qsys. If you use the qsys option, the *PGM bindings are written to the QPGMSRC source file with the *PGM-name member and the PGMSRC type. The *SRVPGM bindings are written to source file QSRVPGMSRC, with member *SRVPGM-name, and type PGMSRC.

    If you use the ifs option, the *PGM and *SRVPGM bindings are written to the -outDir directory with the .PGMSRC and .SRVPGMSRC file extensions.

    This parameter is required if -outFs=qsys. LIBNAME is a library that contains the generated QPGMSRC or QSRVPGMSRC source files.
    Where DIRNAME is an IFS directory name that contains generated source files.
    -objType={*pgm | *srvpgm}
    The default is *PGM. If the value is *PGM, look for *PGM files to generate PGMSRC members.

    If the value is*SRVPGM, look for *SRVPGM files to generate SRVPGMSRC members.

    Where LIBNAME is a working library that contains temporary outputs (for example, *USRSPC) while the utility scans objects from the -inLib library.
    This command replaces the library. The default is libl.
    • Where libl means to replace the bound library names with *LIBL as the search path.
    • Where objlib means to replace the bound library names with an &OBJLIB variable name.
    • Where keep means to keep the bound library names hardcoded as they were found in the *PGMs and *SRVPGMs.