Compile and Execute Cobol db2 Program

How to compile and execute Cobol-db2 program?

Questions by er.shyamakumari

Showing Answers 1 - 3 of 3 Answers

tag_tushar

  • Aug 3rd, 2010
 

For Compiling a COBOL-DB2 program submit this JCL:

//JOBCOMP JOB NOTIFY=&SYSUID,PRTY=15
//JOBPROC  JCLLIB ORDER=ABC.XYZ.SYSLIB    <==SYSTEM LIBRARY PDS
//DB2ICOB  EXEC PRECLINK,
//    COPYLIB='ABC.XYZ.COPYLIB',
//    MEM=CREAT,
//    DBRMLIB='ABC.XYZ.DBRMLIB',
//    LOADLIB='ABC.XYZ.LOADLIB',
//    LMOD=CREAT
//SYSIN DD  DSN=ABC.XYZ.COBOLDB2(CREAT),DISP=SHR
//LKED.SYSIN   DD *
       INCLUDE SYSLIB(DSNELI)
/*
//


COPYLIB: Here we declare that PDS which contain's the DCLGEN version of the SQL file.
MEM         : Here we declare the member name...

DBRMLIB: Here we declare that PDS which contain's the PRECOMPILE version of the DCLGEN file.

LOADLIB  : Here we declare That PDS which contain's the LOADMODULE file of the COBOL-BD2 prog.
LMOD       : Here we declare the member name..

ABC.XYZ.COBOLDB2: This is the COBOL-DB2 PDS.
CREAT: This is the above PDS member name


For Executing the Pre-Compiled COBOL-DB2 program submit this JCL:

//JOBEXEC JOB NOTIFY=&SYSUID,PRTY=15
//JOBLIB   DD DISP=SHR,DSN=DSN710.SDSNEXIT
//         DD DISP=SHR,DSN=DSN710.SDSNLOAD
//         DD DISP=SHR,DSN=CEE.SCEERUN
//BINDPLAN EXEC PGM=IKJEFT01,DYNAMNBR=20
//DBRMLIB  DD DSN=ABC.XYZ.DBRMLIB,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSIN    DD *
/*
//SYSTSIN DD *
 DSN SYSTEM(DSN1)
 BIND PLAN(JOBEXEC) MEMBER(CREAT) ACT(REP)-
      ISOLATION(CS)
, RUN  PROGRAM(CREAT) PLAN(JOBEXEC) -
,      LIB('ABC.XYZ.LOADLIB')
, END
,//

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions