Page 1 of 1

DB2 Run JCL

Posted: Tue Dec 29, 2009 6:35 pm
by biswaranjan
Hi,

I have come across differnt Loadlibs in a COBOL DB2 run JCL.
But I'm confused on the same.

//STEP010 EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=PROD.COBOLDB2.LOAD,DISP=SHR
// DD DSN=SYS1.DSNDSNH.SDSNEXIT,DISP=SHR
// DD DSN=SYS1.DSNDSNH.SDSNLOAD,DISP=SHR
//SYSTSIN DD *
DSN SYSTEM(DSNH)
RUN PROGRAM(DB2ALL) PLAN(plan_name)
LIB(IBMMFS.MACC.LOAD)
END
/*
//DD1 DD DUMMY
//DD2 DD DUMMY

Query:
1. Where does program name DB2ALL program resides? I beleive it resides in PROD.COBOLDB2.LOAD in STEPLIB.
2. What is the use of LIB(IBMMFS.MACC.LOAD) in the //SYSTSIN DD * card and how it's differnt from the STEPLIB?

Regards,
Biswa.

Posted: Tue Dec 29, 2009 8:53 pm
by Anuj Dhawan
Does this manual answer your questions?

Posted: Wed Dec 30, 2009 11:01 am
by biswaranjan
I just browsed the link provided and got the below information.

LIBRARY(library-name)
Specifies the name of the data set containing the program to be run.
If library-name is not specified, normal MVS library searching is used. The data sets specified in the STEPLIB DD statements are first searched for the entry point name of the program. If STEPLIB is not present, then the data sets specified in the JOBLIB DD statements are searched. If the entry point name is not found there, then the link list is searched.


I'm having these two Loadlibs to run the program DB2ALL.
STEPLIB DD DSN=PROD.COBOLDB2.LOAD,DISP=SHR
LIB(IBMMFS.MACC.LOAD)


So is it that LIB(IBMMFS.MACC.LOAD) will be searched for the Load of the program and if it's not available it'll pick it from the STEPLIB?

Regards,
Biswa.

DB2 RUN JCL

Posted: Wed Dec 30, 2009 12:58 pm
by Natarajan
My VIEW on db2 run jcl is...

STEP LIB in DB2 run jcl - System will search for IKJEFT01 in steplib PROD.COBOLDB2.LOAD.

LIB in SYSIN DD * in DB2 RUN JCL -
system will search for DB2ALL in IBMMFS.MACC.LOAD

Posted: Wed Dec 30, 2009 3:34 pm
by Anuj Dhawan
IKJEFT**... are part of the system link-libs, usually available without a step or job lib. Like sort, iebgener, etc... .

STEPLIB contains the member to be executed by the Terminal Monitoring Program IKJEFT01/1a/1b.

Posted: Wed Dec 30, 2009 3:57 pm
by Anuj Dhawan
Natarajan- IKJEFT01 is a terminal monitor program or you can call it "TSO in batch". In the context of this thread, its function is to create an environment to execute program DB2ALL which is present (must be present) in Load library present in STEPLIB.

The STEPLIB statement specifies the library in which the DSN Command Processor load modules and the default application programming defaults module, DSNHDECP, reside. And the LIB keyword specifies the library that the application should access.