Precompile compile and link edit jcl for cobol db2 program The following JCL can be used for compilng and link editing a COBOL DB2 program. This JCL has mainly three steps The PRE COMPILATION Step executes the utility DSNHPC and uses the COBOL DB2 program present in source library and copy library for DCLGEN’s  as input and creates the DBRM with the name of the source program in a temporary library and a modified source program in SYSCIN which is passed on to compilation step. The COMPILATION step executes utility IGYCRCTL and takes as input the modified source program (COBOL module without SQL statements) and copy library and creates an OBJECT code as output of this step. The Link edit step executes utility IEWBLINK and takes as input the Object module created by compilation step and link edits it to create the final load file. //********************************************************************** //* INSTRUCTIONS FOR USING THE JOB :-> //* PRECOMP IS PRECOMPILATION STEP (CHANGE REQD) //*  1. CHANGE TO SYSTEM LIBRARY FROM WHERE TO RUN DSNHPC //*  2. CHANGE ALL TO LIBRARY CONTAINING DCLGEN COPYBOOKS //*  3. CHANGE TO THE LIBRARY CONTAINING SOURCE MODULE //*  4. CHANGE TO NAME OF SOURCE MODULE //* COMPSTEP IS COMPILATION STEP (CHANGE REQD) //*  1. CHANGE TO SYSTEM LIBRARY FROM WHERE TO RUN DSNHPC //*  2. CHANGE ALL TO LIBRARY CONTAINING DCLGEN COPYBOOKS //* LINKSTEP IS LINK EDIT STEP (CHANGE REQD) //*  1. CHANGE TO LIBRARY WHICH WILL STORE THE LOAD MODULE //*  2. CHANGE TO SYSTEM LIBRARY FOR EXEC IEWBLINK //*  3. CHANGE TO SYSTEM LIBRARY FOR EXEC IEWBLINK //*  4. CHANGE TO NAME OF SOURCE MODULE //* COPYDBRM IS LINK EDIT STEP //*  1. CHANGE TO LIBRARY WHICH WILL STORE THE DBRM //********************************************************************** //*      P R E    C O M P I L A T I O N //********************************************************************** //PRECOMP  EXEC PGM=DSNHPC, //       PARM=(‘HOST(COB2)’,’FLAG(I)’,’LINECOUNT(60)’, //       APOST,APOSTSQL,PERIOD,NOOPTIONS,SOURCE) //********************************************************************** //* STEPLIB:-LIBRARY FROM WHERE PRECOMPILE UTILITY WILL BE PICKED //*      THIS WILL BE SYSTEM DEFINED LIBRARIES //********************************************************************** //STEPLIB  DD DSN=, //********************************************************************** //* SYSLIB :-LIBRARY CONTAINING DCLGEN COPYBOOKS //********************************************************************** //SYSLIB   DD DSN=, //********************************************************************** //* DBRMLIB:-LIBRARY WHERE DBRM WILL BE STORED //********************************************************************** //DBRMLIB  DD DSN=&TEMPDBRM(), //       DCB=(RECFM=FB,LRECL=80,BLKSIZE=23440) //       DCB=(RECFM=FB,LRECL=80,BLKSIZE=23440) //********************************************************************** //* SYSIN:-SOURCE LIBRARY CONTAINING COBDB2 MODULE //********************************************************************** //SYSIN   DD DSN=(), //********************************************************************** //*         C O M P I L A T I O N //********************************************************************** //COMPSTEP EXEC PGM=IGYCRCTL, //       PARM=(‘LIB,RENT,DATA(31),OFFSET’, //       ‘NODYNAM,NOADV,NOTERM’, //********************************************************************** //* STEPLIB:-LIBRARY FROM WHERE COMPILE UTILITY WILL BE PICKED //*      THIS WILL BE SYSTEM DEFINED LIBRARIES //********************************************************************** //STEPLIB  DD DSN=, //       DISP=(NEW,PASS,DELETE), //       DCB=(RECFM=FB,BLKSIZE=3200) //********************************************************************** //* SYSLIB :-LIBRARY CONTAINING DCLGEN COPYBOOKS //********************************************************************** //SYSLIB   DD DSN=, //       DISP=(OLD,DELETE,DELETE) //********************************************************************** //********************************************************************** //LINKSTEP EXEC PGM=IEWBLINK, //       PARM=’SIZE=(1920K,256K),LIST,XREF,NCAL’, //       COND=((4,LT,PRECOMP),(4,LT,COMPSTEP)) //********************************************************************** //* SYSLMOD:-LIBRARY WHICH WILL STORE THE LOAD MODULE //********************************************************************** //SYSLMOD  DD DSN=, //********************************************************************** //* SYSLIB :-SYSTEM LIBRARIES FOR EXECUTING IEWBLINK //********************************************************************** //SYSLIB   DD DSN=, //********************************************************************** //* INSTREAM DATA:- NAME OF THE COBOL MODULE //********************************************************************** //       DISP=(OLD,DELETE,DELETE) //********************************************************************** //*   C O P Y  D B R M  S T E P                    * //********************************************************************** //COPYDBRM EXEC PGM=IEBCOPY, //       COND=((4,LT,PRECOMP),(4,LT,COMPSTEP),(4,LT,LINKSTEP)) //********************************************************************** //* PERMDBRM:- LIBRARY WHERE THE DBRM WILL BE STORED //********************************************************************** //PERMDBRM  DD DSN=, //********************************************************************** //* TEMPDBRM:- LIBRARY WHERE THE DBRM WAS CREATED TEMPORARILY //********************************************************************** //TEMPDBRM  DD DSN=&TEMPDBRM, //       DISP=(OLD,DELETE,DELETE)