Developer for System z® defines several global JCL substitution variables that you
can add to your JCL procedures.
The same process can be used to add global variables for JCL
procedures on any of the JCL Substitution tab
pages.
The following process shows how to add global variables for
a COBOL program.
- To add a new global variable for a JCL procedure used with
a COBOL program, open the COBOL Settings page
of the Properties window. In the right pane of the window, select
the JCL Substitution tab.
- Click Insert Global Variable. The Insert
Global Variable window opens.
- Select a variable name from the table and click Insert. The variable name and value are added to the Global variables
list. Repeat these steps as necessary to add other global variables.
When you add global variables to the
JCL Substitution page
and then generate JCL or trigger a remote build or syntax check, a
SET statement is generated just before the EXEC PROC statement. Developer
for System z defines the
following global variables:
- TCPIPADD
- Resolves to the workstation IP address.
- MEM
- Resolves to the source member for which a build, syntax check,
or JCL generation action was requested.
- HLQ
- Resolves to the high-level qualifier of the resource for which
the build, syntax check, or JCL generation action was requested.
- USERID
- Resolves to the user ID used to log on to the remote system.
Assume that an installation has customized the COBOL compilation
JCL procedure to add a custom preprocess step, for example, that expands
the COBOL source and would like to write the output of that preprocess
to a separate partitioned data set. The preprocessed member can be
the input to the compilation step. The preprocessed member has the
same name as the original COBOL source file and the pre-processed
output is written to a separate data set. To write the output from
the preprocess step to a partitioned data set, you can add the following
DD statements to the procedure:
//*custom - preprocess
//SYS012 DD DSN=PDS.NAME(&MEM;),DISP=SHR ---> Writes the pre-processed output to PDS.NAME(&MEM;)
//...
//*compile step
//COBOL.SYSIN DD DSN=PDS.NAME(&MEM;),DISP=SHR
//.....
Developer for System
z resolves &MEM; to the source member for which a build,
syntax check, or JCL generation action is requested, so the user can
use the JCL Substitution tab to insert the global variable MEM in
the properties for the MVS™ subproject
and does not have to insert it for every member.