LE/370 options under CA Easytrieve Report Generator

Document ID : KB000055462
Last Modified Date : 14/02/2018
Show Technical Document Details

DESCRIPTION:

This article describes a way to gather the Language Environment options in use when calling LE routines from a CA Easytrieve program.

ANSWER:

Usually, Easytrieve is independent and therefore is not affected by the LE/370 options on effect when it runs. This is because the product is coded in assembler language and doesn't use this runtime environment.

However, LE/370 comes into play when the application calls subroutines written in COBOL and the cobol environment is requested by the PARM ENVIRONMENT (COBOL) statement in the source program. In this case easytrieve initializes an LE/370 envclave under which the subroutines are called.

When running any LE/370 application it may prove useful to know the values in use for the LE/370 runtime options. This task may be a bit tricky since they can be specified in several places.

An easy way to know the options in effect is by means of the RPTOPT runtime option itself, which produces, at the end of the LE/370 enclave, a report of the runtime options in use for it.

For a COBOL LE/370 main program this option (as well as any other) can be specified as JCL parameter, as in the following example:

//STEP1 EXEC PGM=PROGRAM1,PARM='/RPTOPTS(ON)'

Note the slash in the parm. Anything entered AFTER the slash is interpreted as an LE/370 runtime option, while application parameters would come BEFORE the slash.

This is not possible with Easytrieve, as the programmer has no way to pass parameters to the LE/370 runtime from the Easytrieve program. However, since Easytrieve initializes the COBOL environment by calling a COBOL LE/370 main program, we can still get the options report with the following JCL:

//STEP1 EXEC PGM=EZTPD142,PARM='/RPTOPTS(ON)'
//STEPLIB DD =?same STEPLIB as the easytrieve step
//SYSPRINT DD SYSOUT=*
//SYSSNAP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//

EZTPD142 is a main COBOL program that is linked with LE/370 stub during installation and is called by Easytrieve to initialize the LE environment. It will of course fail when called as a jobstep main program, but prior to the failure, the LE runtime initialization will take place and, after printing the abend report, the LE enclave will terminate and produce the report of the runtime options as requested.