JclIntroduction to JCL Jcl coding sheet JOB Statement Exec statement DD Statement Concatenating Datasets Referback in JCL Special DD statements Utility Programs Utility program IEBGENER Utility programs IEBCOPY and IEBCOMPR DFSort DFSort reformat dataset DFSort INCLUDE OMIT COND Procedures generation data group (GDG) JCL quick study JCL Interview questions
Special DD statements
Any label can be used for the DD statements except the reserverd or special list of ddnames for special-function DD statements. The following are the list of special DD statements for specific uses
Used to identify a program library (PDS) to search first when attempting to locate load modules (PGM=) executed within the entire JOB. Must be placed after the JOB statement and before the first EXEC statement in the JOB. More than one program library can be concatenated. If a STEPLIB is specified in a JOB that also has a JOBLIB, the STEPLIB takes precedence when searching for a program
If two load modules are members of the same PDS then execute the load modules by //PROGPUB JOB NOTIFY=USER //JOBLIB DD DSN=,DISP=SHR //STEP1 EXEC PGM= //………… //STEP2 EXEC PGM= //………… The OS searches the JOBLIB DSN for the two load modules.
The STEPLIB DD statement is used to identify a program library to search first when attempting to locate load modules (PGM=) executed during the JOB STEP. More than one program library can be concatenated. If a STEPLIB DD is specified in a JOB that also has a JOBLIB,the STEPLIB takes precedence when searching for a program. JOBLIB / STEPLIB is used to specify private program libraries
If two load modules are stored as members of two different PDSs, then execute the load modules by //PROGPUB JOB NOTIFY=USER //STEP1 EXEC PGM= //STEPLIB DD DSN=PDS1, …….. (where the above LM is stored) //………… //STEP2 EXEC PGM= //STEPLIB DD DSN=PDS2, ………. (where the above LM is stored) //………… The OS searches the respective STEPLIB DSNs for the two load modules.
Specifies that an execution report of the load module (PGM) is required. It defines the output file containing the execution messages.
//STEP1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1…………… // Note: The SYSOUT parameter specifies the output stream dataset. It routes the report to the class (device) mentioned. SYSOUT=CLASS-code, is the syntax. The class can be any alphanumeric character or an asterisk(*), which refers to the device coded in the MSGCLASS parameter of JOB statement.
Used to begin an Input stream dataset; supplies data to the load module. Instream datasets begin with the parameters * or DATA in the SYSIN DD statement.
//SYSIN DD * or DATA, or DSN
EXAMPLE: //STEP2 EXEC PGM=LOAD1 //STEPLIB DD DSN=EMP.PDS,DISP=MOD //SYSIN DD * HELLO WORLD /*
These are Abnormal termination dumps used to find the source of an error when a program abnormally terminates. Coded after the EXEC statement.
Used to request a formatted dump of the program area, including the contents of the register, a traceback of subroutines called and information about all the datasets used. The dump can be allocated to the SYSOUT CLASS, DASD or TAPE.
//STEP010 EXEC PGM=LM of an Application program
//SYSUDUMP DD SYSOUT=Class
Used to request a dump similar to that of SYSUDUMP and additionally the system nucleus.
Similar to the request of SYSABEND but the dump is unformatted.