LINKAGE SECTION

The LINKAGE SECTION contains declarations of variables that are passed to the program as parameters. The current implementation supports the population of the LINKAGE SECTION for entry programs only.

Note: Entry programs have no incoming program-to-program edges from other programs in the closure; they are the first program or programs in the sequence.

Limitations for Z Refactoring Assistant of LINKAGE SECTION

Potential LINKAGE SECTION variables are currently not populated from non-entry programs or when there are multiple programs in the refactored service. These variables are populated as part of the working-storage section and you must follow either of these steps:
  1. Manually move the variables to the LINKAGE SECTION if required.
  2. Add the initialization manually in the working-storage section if the variable is used in the PROCEDURE DIVISION without an initialization.

PROCEDURE DIVISION USING

This statement is used if the refactored program is a sub-program which can be called from another program, with the variables passed to the service specified in the USING clause and populated in the LINKAGE SECTION. This is common syntax utilized in batch programs.

For CICS® programs, inter-program information is passed using DFHCOMMAREA. Therefore, the USING clause of PROCEDURE DIVISION is not required.

For IMS, if the call is present in the sub-program, then the PCBs and other relevant information are passed to the sub-program from the main program, and this information must be available in the USING clause.