Runtime JCL templates for z/OS

If you set the genRunFile build descriptor option to YES for z/OS® batch and IMS™ BMP environments, EGL creates sample runtime JCL for running the program. The file name is alias.jcx, where alias is set by the alias property for the program, and is truncated to 8 characters; or if the alias property is not specified, it is the program name, truncated to 8 characters. You can tailor the sample runtime JCL after it is transferred to the z/OS host. Alternatively, before you generate the output code, you can customize the templates that EGL uses to provide the basic pattern for the sample runtime JCL as described in Modifying the runtime JCL templates for z/OS.

The name and type of file generated depends on the target system:
The templates used for creating the sample runtime JCL are selected according to the following criteria:

Runtime JCL templates

The following table shows the JCL templates and procedures used for running z/OS batch programs.
Table 1. Templates used for running MVS batch programs

Environ-
ment

Program SQL DL/I Calls CICS® EXCI? Template Procedure called by template
z/OS batch Main Yes Yes n/a fda2mebb DLIBATCH
z/OS batch Main No Yes n/a fda2mebc DLIBATCH
z/OS batch Main Yes No No fda2mebd  
z/OS batch Main Yes No Yes fda2mesx  
z/OS batch Main No No No fda2mebe  
z/OS batch Main No No Yes fda2mebx  
z/OS batch Called The use of the template is not affected by SQL or DL/I usage. * * fda2meba  

Each of the JCL templates contains a ?DD? line that starts in column one. This line indicates where the generation function is to insert the DD statements for files and databases used by the program. Move this line within the JCL template to control where the DD statements are placed. If you remove the line that contains ?DD?, the DD statements are not included in the generated JCL.

An exception to the above is the fda2meba template. For called programs, libraries and services the fda2meba template only includes the DD statements. You can incorporate these DD statements into the sample runtime JCL of any main program that calls the generated program, or uses the library or service.

More about DL/I use for z/OS batch

DL/I usage is indicated if the program includes at least one of the following attributes or functions:
  • The PSBRecord used by the program includes a database other than ELAWORK.
  • The program's PSB is passed on a call statement.
  • The program receives the PSB or a PCB from the PSBRecord as a parameter.
  • The program uses the dliLib.AIBTDLI, dliLib.EGLTDLI, or vgLib.VGTDLI system functions.
  • The program uses sysLib.audit and a PSBRecord is used in the program.
  • The program references any PCB from the PSBRecord in any statement.
  • The program associates a serial file with GSAM.

Runtime JCL templates for IMS BMP

The next table shows the JCL templates and procedures used for running IMS BMP programs.
Note: DL/I is always present in the IMS BMP environment.
Table 2. Templates used for running IMS BMP
Environment Program SQL Template Procedure called by template
IMS BMP Main Yes fda2meia IMSBATCH
IMS BMP Main No fda2meib IMSBATCH
IMS BMP Called * fda2meba  
Note: * The use of the template is not affected by SQL usage.
Each of the JCL templates contains a ?DD? line that starts in column one. This line indicates where the generation function is to insert the DD statements for files and databases used by the program. Move this line within the JCL template to control where the DD statements are placed. If you remove the line that contains ?DD?, the DD statements are not included in the generated JCL.

File and database allocation templates

For called programs, libraries and services, the fda2meba template only includes the DD statements. You can incorporate these DD statements into the sample runtime JCL of any main program that calls the generated program or uses the library or service.

Some of the files or databases used by a program require file or database templates for generating file allocation statements. The following table shows the template selected based on the following information:
  • The type of record
  • Whether the record is input or output
  • The file type specified in the resource associations part
Table 3. Templates for generating file allocation statements
Record type Input or output Associated file type JCL template for z/OS batch
DL/I segment Input or output   fda2mdli
Indexed Relative Serial Input VSAM, VSAMRS fda2mvsi
Indexed Relative Serial Output VSAM, VSAMRS fda2mvso
Serial Input SEQ, SEQRS fda2msdi
Serial Output SEQ, SEQRS fda2msdo
Serial Input GSAM fda2mgsi, fda2mims
Serial Output GSAM fda2mgso, fda2mims
Note: The statements generated from file and database templates are included at points marked by the ?DD? line in the program template.
fda2mims
The fda2mims template is an extra template for GSAM. For IMS BMP jobs, if any of the serial files, or the printer, is associated with a GSAM file, the template fda2mims is also included.
fda2mdli
The fda2mdli template is only included if the target environment is z/OS batch. For the IMS BMP target environment, the database should already be allocated to the IMS control region. This template has the DD statement commented out. EGL does not collect the resource association information needed to build this statement. You must provide the final tailoring of these DD statements in the sample runtime JCL after the program has been generated.

File and database allocation placeholder templates

The generated sample runtime JCL for a program must be modified to include DD statements for files referenced using the record-specific variable record-name.resourceAssociation or the converseVar.printerAssociation system variable, or for files and databases used by programs that are called or transferred-to from the initial program in the run unit.

The following table shows the templates that generate comments in the sample runtime JCL to indicate the place where DD statements can be included.

Table 4. Templates that generate comments in sample run-time files
Program function JCL template for MVS batch or IMS BMP
Program uses sysVar.transferName or a variable name as the target program in a call, transfer to program, or transfer to transaction statement fda2meza
Program uses a specific program name as the target program in a call, transfer to program, or transfer to transaction statement fda2mcal
Program sets the record-specific variable record-name.resourceAssociation or the converseVar.printerAssociation system variable fda2mezd

Feedback