Plz help with answer

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
Ghilli
Member
Posts: 13
Joined: Wed Apr 29, 2009 12:01 am

Plz help with answer

Post by Ghilli » Tue May 05, 2009 1:02 pm

JOBLIB DD DSN=LIB1,DISP=SHR
JOBLIB1 DD DSN=LIB2,DISP=SHR
EXEC PGM=COMPARE
JOBCAT2 DD DSN=LIB3,DISP=SHR
JOBSRC4 DD DSN=LIB4,DISP=SHR
JOBPGM3 DD DSN=LIB5,DISP=SHR

Refering to the sample code above, in which dataset will the system first look for
the program COMPARE?

1.LIB1
2.LIB2
3.LIB3
4.LIB4
5.LIB5

Plz help with answer?

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

Post by Anuj Dhawan » Tue May 05, 2009 1:09 pm

Hi,

What do you think?
Regards,
Anuj

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

Post by Anuj Dhawan » Tue May 05, 2009 1:20 pm

Hi,

This is from Manuals, now think what should be the answer:

Program Search Order: The program search order for MVS uses the following program libraries in the order given:
1) JOB Pack Area (already loaded programs)
2) Private task library, if specified.
3) STEPLIB library, if specified.
4) JOBLIB library, if specified, AND no STEPLIB is specified
5) Link Pack Area (PLPA)
6) System Link List (i.e., SYS1.LINKLIB and the data sets concatenated to it).
Regards,
Anuj

Ghilli
Member
Posts: 13
Joined: Wed Apr 29, 2009 12:01 am

answer

Post by Ghilli » Tue May 05, 2009 4:51 pm

LIB1 is the answer? correct?

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

Post by Anuj Dhawan » Wed May 06, 2009 1:52 pm

No, that's not correct. Answer is LIB3.

JOBLIB is searched only if STEPLIB(s) is(are) not defined. If STEPLIBs are defined, first library in the concatenation will be searched first.
Regards,
Anuj

Ghilli
Member
Posts: 13
Joined: Wed Apr 29, 2009 12:01 am

Thanks Anuj

Post by Ghilli » Wed May 06, 2009 11:33 pm

Thanks Anuj,

It would be more useful, if u could provide more justification for that answer.

Thanks.

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

Post by Anuj Dhawan » Thu May 07, 2009 11:37 am

Hi Ghilli,

You are welcome . . . :).

I'm not sure, what are you looking for when you say:
It would be more useful, if u could provide more justification for that answer.
What part of this, from m y previous reply
JOBLIB is searched only if STEPLIB(s) is(are) not defined. If STEPLIBs are defined, first library in the concatenation will be searched first.
is not clear to you?
Regards,
Anuj

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

Post by Anuj Dhawan » Thu May 07, 2009 11:51 am

Hi,

Manual says (the other one . . . :wink: ):
The system searches for a program in the private library you identify. If a job contains a JOBLIB DD statement and a step contains a STEPLIB DD statement, the system searches for the step's program first in the STEPLIB library and then in the system libraries. The system ignores the JOBLIB library for that step.
Regards,
Anuj

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

Post by Anuj Dhawan » Thu May 07, 2009 11:59 am

Hi again,

Try this:

1. Allocate a dataset to be used as JOBLIB.
2. Aallocate a dataset to be used as STEPLIB.

Assemble and link into the JOBLIB dataset and not in STEPLIB and SUBmit the JCL -- you'll get abend S806 which means load module not found . . .. This should calrify your doubt(s).
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