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.
- For MVS™ batch or IMS™ BMP the generation function creates sample
JCL for running the program. The file name is
alias.jcx.
- The target runtime environment
- Whether the program is a main or called program
- The use of DB2® in the program
- The use of DL/I in the program
Runtime JCL templates
The following table shows the JCL templates and procedures used for running z/OS® batch programs.Environ- |
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
- 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
| 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. |
||||
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.
- The type of record
- Whether the record is input or output
- The file type specified in the resource associations part
| 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 |
- 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.
| 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 |