Example of JCL

An example of the runtime JCL to run a program that uses MTF is shown in Figure 1. This figure shows the JCL that is unique to running MTF, as well as the other JCL the program would typically require. (Some programs might require additional DD statements.)

Figure 1. Example runtime JCL
//GO       EXEC PGM=MTASKPGM
//STEPLIB  DD  DSN=USERPGM.LOAD,DISP=SHR
//STDIN01  DD  DSN=USERPGM.INPUT,DISP=SHR
//STDOUT02 DD  SYSOUT=S,DCB=(RECFM=F)

MTASKPGM is the name of the main task program load module, and is the load module that gets control when MVS first starts running the program. In this example, this load module is contained in data set USERPGM.LOAD, which is referred to by the STEPLIB DD statement. USERPGM.LOAD also contains the parallel functions.

The STDIN01 DD statement specifies the data set that contains the program’s input data for the first task. The STDOUT02 DD statement specifies that printed output aside from runtime error messages from the second subtask is to be written to SYSOUT class S and that the record format is to be fixed-length. These DD statements are necessary only if you do not want to accept the defaults.