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

Query about MODS command


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
saiprasadh

Active User


Joined: 20 Sep 2006
Posts: 154
Location: US

PostPosted: Fri Jun 01, 2007 12:17 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Jun 01, 2007 1:18 pm
Reply with quote

I see no restriction in the manual about using DB2 in your COBOL user exit routine.
Back to top
View user's profile Send private message
saiprasadh

Active User


Joined: 20 Sep 2006
Posts: 154
Location: US

PostPosted: Fri Jun 01, 2007 2:53 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Jun 01, 2007 4:44 pm
Reply with quote

You need to have the correct version of DSNARRS in your lib concatination, maybe a steplib?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Jun 01, 2007 10:39 pm
Reply with quote

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
View user's profile Send private message
saiprasadh

Active User


Joined: 20 Sep 2006
Posts: 154
Location: US

PostPosted: Mon Jun 04, 2007 9:48 am
Reply with quote

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
View user's profile Send private message
Ulrich

New User


Joined: 16 Apr 2007
Posts: 4
Location: Germany

PostPosted: Fri Jun 15, 2007 10:32 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Jun 15, 2007 11:45 am
Reply with quote

Hello and welcome to the forums,

Thank you for sharing this suggestion icon_smile.gif

Hopefully, we will hear back from Sai that his process is working now.
Back to top
View user's profile Send private message
Ulrich

New User


Joined: 16 Apr 2007
Posts: 4
Location: Germany

PostPosted: Fri Jun 15, 2007 12:09 pm
Reply with quote

Hi Dick,

I Know the JCL is looking quite strange, but it works...
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 Jun 15, 2007 12:39 pm
Reply with quote

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 icon_smile.gif

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
View user's profile Send private message
saiprasadh

Active User


Joined: 20 Sep 2006
Posts: 154
Location: US

PostPosted: Fri Jun 15, 2007 1:06 pm
Reply with quote

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
View user's profile Send private message
Ulrich

New User


Joined: 16 Apr 2007
Posts: 4
Location: Germany

PostPosted: Fri Jun 15, 2007 11:17 pm
Reply with quote

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
View user's profile Send private message
Ulrich

New User


Joined: 16 Apr 2007
Posts: 4
Location: Germany

PostPosted: Fri Jun 15, 2007 11:34 pm
Reply with quote

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
icon_biggrin.gif
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: Sat Jun 16, 2007 5:11 am
Reply with quote

Hi Ulrich,

You're welcome icon_smile.gif

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 icon_redface.gif
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts RC query -Time column CA Products 3
Search our Forums:

Back to Top