Saturday 26 January 2013

Statements In JCL

Compulsary Statements :
1) JOB statement     - Job statement will tell information about job.
2) EXEC statement  - Exec statement will tell what needs to be executed.
3) DD statement       - DD statement will provide information about input and output files from job.

Other statements :
1) JCLLIB - It provides path of Cataloged procedure. 
2) STEPLIB - It provides path of LOAD libraries.STEPLIB is for perticular step.
3) JOBLIB - It provides path LOAD libraries. JOBLIB is for entire job.


//JOB1      JOB
//JOBLIB   DD DSN=OZA201.JOB.LOADLIB,DISP=SHR
//STEP1  EXEC PGM=PROG1
//STEPLIB DD DSN=OZA201.STEP.LOADLIB,DISP=SHR

In this JOB both JOBLIB and STEPLIB are coded. while executing STEP1 system will search for PROG1 load module in STEPLIB library, if it is not present in STEPLIB library then it will search in JOBLIB library.
If it is found in JOBLIB then STEP1 will be executed by using load module form JOBLIB library. 
         If LOAD module is not present in JOBLIB library then job will abned with S806 abend code. 


Special DD names :

1) SYSIN            - If we want to provide input to JCL then we can provide it in SYSIN statement.
2) SYSABEND   - It will give abend messages after abnormal termination
3) SYSUDUMP   - It will give abend messages after abnormal termination
4) SYSPRINT     - It will print jcl/allocation messages.
5) SYSOUT        - It will route jcl/allocation messages to spool area.





No comments:

Post a Comment