View previous topic :: View next topic
|
Author |
Message |
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi,
I have a Doubt Regarding MODS command, Can we use the above mention command for executing the COBOL DB2 program.If so please let me know the Steps to execute that.
Thanks
Sai |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I see no restriction in the manual about using DB2 in your COBOL user exit routine. |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi William,
This is the JCL i am using
Code: |
//STEPMAT EXEC SORTD
//EXITLIB DD DSN=My.Library,DISP=SHR
//SORTIN DD DSN=My.input,
// DISP=SHR
//SORTOUT DD DSN=My.input.TEST,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(50,50),RLSE),UNIT=SYSDA,
// DCB=(*.SORTIN)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,8,BI,A)
OPTION COBEXIT=COB2
MODS E35=(MYSYN,1024000,EXITLIB,C)
/* |
Where
MYSYN is My Cobol DB2 program, I am getting the following Error while submitting the JOB
CSV003I REQUESTED MODULE DSNARRS NOT FOUND
CSV028I ABEND806-04
Can you provide me the Exact JCL .
Thanks
Sai |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
You need to have the correct version of DSNARRS in your lib concatination, maybe a steplib? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
MODS specifies a DFSORT user exit which must use one of the interfaces documented at:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/4.0?DT=20060615185603
You can write a COBOL E35 using that documented interface. Your MODS statement looks ok.
However, I don't know if you can write a "COBOL DB2" E35 exit using that documented interface or what other libraries you might need to specify in the JCL. |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi William/Frank
Thanks for the response, I found the location of the DSNARRS
and added that in the STEPLIB still the program is not running.It is encountering some problem while executing the DB2 statement,
Usually we will specify the PLAN name for the COBOL DB2 program for the execution but in the above MOD statement we are not specifying that . Where we have to specify that details.
Thanks
Sai |
|
Back to top |
|
|
Ulrich
New User
Joined: 16 Apr 2007 Posts: 4 Location: Germany
|
|
|
|
Hi Saiprasadh <Hello to all, ist my first post, so pls be patient, if something is wrong>
SORT and DB2 ist quite simple, try it that way :
Code: |
//STEPLIB DD DSN=user..load..,DISP=SHR
// DD DSN=DB2..DSNLOAD,DISP=SHR
//SORTWORK DD UNIT=SYSDA,SPACE=(TRK,(99,99))
//SYSOUT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SORTIN DD DSN...
//SORTOUT DD DSN..
//SYSTSIN DD *
DSN SYSTEM(DB2.)
RUN PROGRAM(SORT) PLAN(DV....)
END
//SYSTSPRT DD SYSOUT=*
//SYSIN DD *
your SORT-staements |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forums,
Thank you for sharing this suggestion
Hopefully, we will hear back from Sai that his process is working now. |
|
Back to top |
|
|
Ulrich
New User
Joined: 16 Apr 2007 Posts: 4 Location: Germany
|
|
|
|
Hi Dick,
I Know the JCL is looking quite strange, but it works... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Ulrich,
Your JCL doesn't look strange - it is just my hope that Sai will post the results when it is run on that system
As a hint, when you post JCL and control statements, if you use the "Code" tab at the top of the Reply panel, it is much more readable. I'll convert your solution to Code so you can see how that looks - it also helps with alignment. |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi Ulrich
Thanks for your reply.I tried your JCL but it is not providing the expected result, I am getting DB2 error while executing the program.
The JCL used:
Code: |
//STEPMAT EXEC SORTD
//EXITLIB DD DSN=My.Load,DISP=SHR
//STEPLIB DD DSN=MyDB2.Load,DISP=SHR
// DD DSN=My.Load,DISP=SHR
//SORTWORK DD UNIT=SYSDA,SPACE=(TRK,(99,99))
//SYSOUT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SORTIN DD DSN=My.Input.PS,DISP=SHR
//SORTOUT DD DSN=My.Output.PS,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(50,50),RLSE),UNIT=SYSDA,
// DCB=(*.SORTIN)
//SYSTSIN DD *
DSN SYSTEM(DB2T)
RUN PROGRAM(MYSYN) PLAN(SAIPLAN1)
END
//SYSSPRT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,8,BI,A)
OPTION COBEXIT=COB2
MODS E35=(MYSYN,1024000,EXITLIB,C)
/* |
My SYSOUT output
Code: |
LS-EXIT-STATUS 00000000
LS-CURRENT-REC-AREA 1
DB2-ERROR |
My requirement is to pass the data from the Input dataset to the linkage section variables of the COBOL DB2 program, from that variables i'll perform some Sql operations.
Thanks
Sai |
|
Back to top |
|
|
Ulrich
New User
Joined: 16 Apr 2007 Posts: 4 Location: Germany
|
|
|
|
HI Sai,
I assume your pgm is somewhat like the COBOL E35 Routine Example in the Applic Guide, which is really nice..... Put some DB2 on it and you're done ;-)
Let's walk in the prob :
1)What is behind >DB2-ERROR< ? DISPLAY of SQLSTATE/SQLCODE would be helpful
2) What does >LS-EXIT-STATUS< and the other >LS-CURRENT-REC-AREA<
mean ?
Ulrich
PS Thks Dick for your advice, it's really readable now. Hopefully I get it done the next time.. |
|
Back to top |
|
|
Ulrich
New User
Joined: 16 Apr 2007 Posts: 4 Location: Germany
|
|
|
|
Sai,
I am getting older and forget the real important things.....
Have a look at >RUN PROGRAM(SORT)< and change your JCL. The MODS-Statement is OK and remains as it is.
Just give it a try
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Ulrich,
You're welcome
Something i probably over-use is Preview - which let's me see the message as it will appear after i Submit. Even then, i still find more typo's - and som i don't find until someone points them out |
|
Back to top |
|
|
|