Run JCL for program


Note! The prerequisites to run a simple COBOL program are -
  • The program shouldn't have any compilation errors and should be compiled with return codes 0 or 4 (MAXCC = 00 OR MAXCC = 04).
  • The load module should be placed in the load library.

RUN JCL -

----+----1----+----2----+----3----+----4----+----5----+
//MATEGJD JOB MSGLEVEL=(1,1),NOTIFY=&SYSUID 
//******************************************
//*  RUN A COBOL PROGRAM
//******************************************
//STEP01  EXEC PGM=FIRSTPRG
//STEPLIB  DD  DSN=MATEGJ.LOADLIB,DISP=SHR
//SYSOUT   DD  SYSOUT=*
  • FIRSTPRG is the program name that should run.
  • MATEGJ.LOADLIB is the load library where the load modules of FIRSTPRG is placed.

Submit the above JCL by modifying the program name and the load library to execute the program.

RUN JCL Submit

Once the MAXCC is 00(without warning or errors) or 04(with warnings), the COBOL program ran successfully.

RUN JCL Return Code

Check the output in SYSOUT of the SPOOL -

Program Output