z/OS Language Environment Customization
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Modifying the COBOL parameter list exit

z/OS Language Environment Customization
SA38-0685-00

The COBOL parameter list exit routine IGZEPSX can be modified to alter the parameter list processing when a COBOL main program is invoked by an z/OS ATTACH. Start of change This exit is ignored by programs compiled with COBOL V5R1 and later releases. End of change

With the IBM® supplied default COBOL parameter list exit, if the COBOL main is invoked by using the ATTACH SVC, a halfword-prefixed string is passed to the application after runtime options have been removed. The source of this string is dependent on the environment in which the ATTACH is issued:
  • If the ATTACH is issued by z/OS to invoke a batch program, the string is specified using the PARM field of the EXEC statement.
  • If the ATTACH is issued by TSO/E to attach a Command Processor (CP), the string is specified as part of the command embedded within the CP parameter of the TSO/E ATTACH CP command.
  • If the ATTACH is not issued by z/OS or TSO/E, the string is specified using the PARM field of the ATTACH macro.

If the default behavior does not meet your needs, the COBOL parameter list exit IGZEPSX can be altered to set the parameter list processing so that R1 and the parameter list is passed without change to the main COBOL program.

Use the IGZWAPSX sample job to change the COBOL parameter list exit. You must replace the comment in IGZWAPSX with your source for IGZEPSX. You can copy the source for the IBM-supplied default COBOL parameter list exit from IGZEPSX in SCEESAMP and modify it to suit your needs. Included in IGZEPSX is sample code that can be used to get the same parameter list processing that is done when running COBOL programs with the VS COBOL II runtime library.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014