Menu

A JCL is coded in PS (a single flat file in mainframe) which has a length of 80 bytes as shown,

1-3------10-12-------------------------------------------------------71-72-------80
| |       |  |                                                       |  |        | 


A JCL statement should be coded from column 1 to column 71. Column 72 to column 80 is not used as part of the JCL statement.


A JCL statement has 5 fields Identifier, Name, Operation, Operand and Comment.

Identifier :

This field must be coded in column 1,2,3.
A JCL statement starts with '//'(two forward slashes) in first 2 bytes or column 1 and 2. '//*' in column 1,2,3 to comment a JCL statement. This is a mandatory field.

1-3--------------------------------------------------------------------71-72-------80
| |                                                                    |  |        |
//PROGPUB JOB NOTIFY=&SYSUID
//* This is a comment line


Name:

The Name field must be coded in column 3 to 10 with maximum of 8 bytes. It can be a mix of alphanumeric (A-Z, 0-9) or national characters(#,@, $) and the first character should be alphabetic or national character.

1-3-----9--------------------------------------------------------------71-72-------80
| |                                                                    |  |        |
//PROGPUB JOB NOTIFY=&SYSUID ----> PROGPUB is the name of this job which start at column 3 and ends at column 9. 


Operation:

The operation field must be coded from or after column 12 onward. This field indicated the type of control statement (JOB, EXEC or DD).

1-3--------12----------------------------------------------------------71-72-------80
| |        |                                                           |  |        |
//PROGPUB  JOB NOTIFY=&SYSUID ---> JOB keyword is the                                   
//          SET PGM=PROGRAM1                                    
//STEP1    EXEC IGYWCL,PARM.COBOL='LIB'                           
//COBOL.SYSIN DD DSN=PROGPUB.COBOL.PROGRAMS(&PGM),DISP=SHR 


Operand:

The operand or parameters field is coded after the operation field and can be coded up to column 71. Each parameter is separated by commas.

1-3--------12----------------------------------------------------------71-72-------80
| |        |                                                           |  |        |
//PROGPUB  JOB NOTIFY=&SYSUID ---> NOTIFY is an operand field                                  
//          SET PGM=PROGRAM1                                    
//STEP1    EXEC IGYWCL,PARM.COBOL='LIB'                           
//COBOL.SYSIN DD DSN=PROGPUB.COBOL.PROGRAMS(&PGM),DISP=SHR ---> DSN is an operand field


Comment:

The comment field can be coded after the operand field up to column 71. This field must follow the operand field and if there is no operand field, the comment field should not be used.

1-3--------12----------------------------------------------------------71-72-------80
| |        |                                                           |  |        |
//PROGPUB  JOB NOTIFY=&SYSUID This is a comment                                  
//*          SET PGM=PROGRAM1 ---> This setp is commented                                    
//STEP1    EXEC IGYWCL,PARM.COBOL='LIB'                           
//COBOL.SYSIN DD DSN=PROGPUB.COBOL.PROGRAMS(&PGM),DISP=SHR