DB2 Run JCL

Ask question on - DataBase Concepts, IBM Mainframe DB2, DB2/UDB, DB2 Tools, SQL , DB2 programming with languages like COBOL, PL1.

Moderators: Kalicharan, Moderator Group

Post Reply
biswaranjan
Member
Posts: 20
Joined: Thu Aug 28, 2008 10:41 am

DB2 Run JCL

Post by biswaranjan » Tue Dec 29, 2009 6:35 pm

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.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Dec 29, 2009 8:53 pm

Does this manual answer your questions?
Regards,
Anuj

biswaranjan
Member
Posts: 20
Joined: Thu Aug 28, 2008 10:41 am

Post by biswaranjan » Wed Dec 30, 2009 11:01 am

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.

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

DB2 RUN JCL

Post by Natarajan » Wed Dec 30, 2009 12:58 pm

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
Natarajan
Chennai

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Dec 30, 2009 3:34 pm

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.
Last edited by Anuj Dhawan on Thu Dec 31, 2009 2:18 pm, edited 1 time in total.
Regards,
Anuj

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Dec 30, 2009 3:57 pm

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.
Regards,
Anuj

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others