Coding Sheet & Rules
Coding Sheet & Rules
All the JOB statements will follow the JCL coding sheet rules and standards except the DFSORT control statements (statements coded in SYSIN DD). For coding a JOB statements, refer JCL Coding Sheet .
The DFSORT control statements coding sheet is as shown below -
----+----1----+----2----+----3----+----4----+----5---+
//job-card
//*
//STEP10 EXEC PGM=SORT
//SORTIN DD DSN=MATEPK.DFSORT.INPUT,DISP=SHR
//SORTOUT DD DSN=MATEPK.DFSORT.OUTPUT,...
//SORTWK01 DD SPACE=(CYL,(1,1),RLSE),UNIT=SYSDA
//SORTWK02 DD SPACE=(CYL,(1,1),RLSE),UNIT=SYSDA
//SYSIN DD *
control-statements
/*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
Points to Note -
- If any control statement starts with *(asterisk) in the column1, then it is considered as comment. If a statement with blank columns from 1-71 is treated as comment.
- If label is present, a label should begin in column1.
- If control statements at line1 ends with comma-blank or semicolon-blank or colon-blank, DFSORT continues on line2 from anywhere in between columns 2-71.
- If the control statements in line1 breaks at column 71 with a nonblank in column 72, columns 2-15 of line2 are blank, DFSORT continues on line2 starts from column 16 (blank or nonblank).
Rules to Remember -
- 1 to 71 columns used to code the statements
- Operation and operands should be in uppercase.
- Column1 of each control statement can be used for either a label or a comment.
- Labels and remarks are allowed only in the SYSIN and SORTCNTL files.
- The last operand should be followed by at least one blank.
- Commas, semicolons and blanks are used only as delimiters and can use in values only if those are constants.
Return Codes
For successful completion, DFSORT returns the return code (RC) of 0 or 4 to the operating system. For unsuccessful completion due to an unsupported OS, DFSORT passes back a return code of 24 to the operating system. For unsuccessful completion, DFSORT passes back a return code of 16, 20 or 28 to the operating system.
The DFSORT return codes meaning is -
- 0 - Successful completion. DFSORT processing completed successfully.
- 4 - Successful completion. DFSORT processing completed successfully with warning messages.
- 16 - Unsuccessful completion. DFSORT detected with an error that stopped the processing from completing successfully.
- 20 - Message data set missing. DFSORT founds that DD statement not coded for DDname.
- 24 - Unsupported operating system. DFSORT doesn't supported by the OS.
- 28 - Wrong entry name. DFSORT detected program entry errors.