View previous topic :: View next topic
|
Author |
Message |
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
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 |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
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 :
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
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 |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
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 |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
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 |
|
|
|