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
 

 

Query about MODS command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Query about MODS command
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: 3158
Location: Tucson AZ

PostPosted: Fri Jun 01, 2007 1:18 pm    Post subject:
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    Post subject: Re: Query about MODS command
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: 3158
Location: Tucson AZ

PostPosted: Fri Jun 01, 2007 4:44 pm    Post subject:
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 Moderator


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

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

MODS specifies a DFSORT user exit which must use one of the interfaces documented at:

http://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    Post subject:
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    Post subject: Re: Query about MODS command
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

Site Director


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

PostPosted: Fri Jun 15, 2007 11:45 am    Post subject:
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    Post subject: Re: Query about MODS command
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

Site Director


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

PostPosted: Fri Jun 15, 2007 12:39 pm    Post subject:
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    Post subject:
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    Post subject: Re: Query about MODS command
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    Post subject: Re: Query about MODS command
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

Site Director


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

PostPosted: Sat Jun 16, 2007 5:11 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am


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