Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to find the program type using a JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: How to find the program type using a JCL
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    Post subject: Reply to: How to find a JCL
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

Site Director


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

PostPosted: Fri Dec 12, 2008 9:41 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Dec 12, 2008 10:59 pm    Post subject:
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    Post subject: Reply to: How to find the program type using a JCL
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts Compiling program in endeavor for tra... RALAKKAL Compuware & Other Tools 4 Mon Jun 05, 2017 8:27 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us