IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to find the program type using a JCL


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Fri Dec 12, 2008 4:44 pm
Reply with quote

Hi All,
Just by looking into a jcl how can we say whether its a cobol-db2 pgm.
This was an interview question asked, i dont know the answer thats the reason i am asking you people.
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Fri Dec 12, 2008 5:14 pm
Reply with quote

There are 2 things I would like to say about this post.

The topic of this post is pretty misleading, please try giving a better Topic header to your questions.

2nd - If you had ever executed COBOL - DB2 code, you will easily make out the difference b/w DB2 & Non-DB2 code.

JCL for Non-DB2 cobol :
Code:
//STEP001 EXEC=PGM


JCL for COBOL-DB2 :
Code:
//STEP001 EXEC=IKJEFT01
//SYSTSIN DD *
DSN SYSTEM(DSN)
RUN -
PROGRAM(PGM) PLAN(PGMPLAN) -
LIB('PGM.LIB') 


I guess the above things are enough to make out the difference. Please let me know, if you still have doubts.
Thanks,
-Kapil.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Dec 12, 2008 9:41 pm
Reply with quote

Hello,

Code:
//STEP001 EXEC=PGM
This might also be a cobol/db2 program. . .

Many systems run this way rather than inside a batch tso session.


Code:
//STEP001 EXEC=IKJEFT01
//SYSTSIN DD *
DSN SYSTEM(DSN)
RUN -
PROGRAM(PGM) PLAN(PGMPLAN) -
LIB('PGM.LIB') 
This can also be used for non-db2 programs. . .

The point being that looking at the jcl only gives a hint not a guarantee that the execution is db2 or not.

fwiw.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Dec 12, 2008 10:53 pm
Reply with quote

It is an indicator if the STEPLIB has a DB2 library in it such as:

//STEPLIB DD DSN=DB2.SDSNLOAD,DISP=SHR
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Dec 12, 2008 10:59 pm
Reply with quote

Hello,

Quote:
It is an indicator if the STEPLIB has a DB2 library in it such as:
Again - this is only a hint, not a guarantee.

A db2 load lib might be in the steplib of a non-db2 program.

It might also be that the db2 loadlib(s) are part of the linklist and not need to be mentioned in a steplib or joblib.

IMHO - this is not a good interview question. . .
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Sat Dec 13, 2008 12:54 am
Reply with quote

Hi,

I never new we could ever execute a cobol-DB2 program via EXEC=PGM.

Could you please let me know, in the above scenario. How do we specify DB2 Plan to be accessed.

Thanks,
-Kapil.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Sat Dec 13, 2008 1:33 am
Reply with quote

To execute a cobol-DB2 program via EXEC=PGM you can use CAF (call attachment facility) or RRS (Resource Recovery Services). There are several way of specifying the package or plan depending on how the CAF or RRS was implemented. You may need to add a DD to specify this or it may be required to be the same name as the program.

The program will need to be relinked and make sure the proper DSNWLI,DSNHLI, DSNALI, ... modules are linked in.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top