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
 

 

overriding sort I/P and O/P files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
prasadrachuri

New User


Joined: 19 Aug 2003
Posts: 20
Location: kolkata

PostPosted: Wed Aug 20, 2003 10:24 am    Post subject: overriding sort I/P and O/P files
Reply with quote

Hi,
I have a proc in which SORT is being used,now i have to override the sort infile and outfile from outside my main proc.

i have traied it by giving outside the proc but it's giving error....

how can i do it??...

Thanks in advance
Back to top
View user's profile Send private message

mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1202
Location: India

PostPosted: Wed Aug 20, 2003 3:40 pm    Post subject:
Reply with quote

But you must add SYSIN in the calling program for SORT pgm. You can override SORTIN & SORTOUT in the calling job using the step name.
Back to top
View user's profile Send private message
prasadrachuri

New User


Joined: 19 Aug 2003
Posts: 20
Location: kolkata

PostPosted: Wed Aug 20, 2003 4:43 pm    Post subject:
Reply with quote

sorry i forgot to mention... i'm doing external sort in the jcl ..i'm not doing sort in my program..i hope u got it now...

for ex ..the code will be like this..

//xxxxx proc
//yyyyy pgm=ddddd
//........
//.......
//sort1 exec proc=SORT
//sortin dd dsn=xx.yy.zz,disp=shr
//sortout dd dsn=xx.yy.ww,disp=(new,catlg)....
//zzzzz pgm=ggggg
//...........
//.......
// pend
//abcd proc=xxxxx

now i want to override my sortin and sortout files out side my xxxxx proc
how it can be done???
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1202
Location: India

PostPosted: Thu Aug 21, 2003 9:06 am    Post subject:
Reply with quote

prasadrachuri wrote:


//xxxxx proc
//yyyyy pgm=ddddd
//........
//.......
//sort1 exec proc=SORT
//sortin dd dsn=xx.yy.zz,disp=shr
//sortout dd dsn=xx.yy.ww,disp=(new,catlg)....
//zzzzz pgm=ggggg
//...........
//.......
// pend
//abcd proc=xxxxx




Just try this:

//ABCD PROC=XXXXX
//SORT1.SORTIN DD DSN= <i/p dataset>
//SORT1.SORTOUT DD DSN= <o/p dataset>
//SORT1.SYSIN DD *
SORT FIELDS= <control cards>
Back to top
View user's profile Send private message
prasadrachuri

New User


Joined: 19 Aug 2003
Posts: 20
Location: kolkata

PostPosted: Thu Aug 21, 2003 12:48 pm    Post subject:
Reply with quote

//ABCD PROC=XXXXX
//SORT1.SORTIN DD DSN= <i/p dataset>
//SORT1.SORTOUT DD DSN= <o/p dataset>
//SORT1.SYSIN DD *
SORT FIELDS= <control cards>

sir,
i have traied the above code earlier also... it's giving jcl error

i have noticed error as "overriden step not found in procedure"
Back to top
View user's profile Send private message
Sharan

New User


Joined: 22 Dec 2003
Posts: 6
Location: Banaglore

PostPosted: Mon Jan 19, 2004 6:38 pm    Post subject:
Reply with quote

Hi Prasadrachuri,

If U have coded the proc as an instream procedure here is a way of overriding the Infile and outfile.

Code:
//**** JOB CARD ****
//PROCSRT PROC                                                         
//SORTST  EXEC PGM=SORT
//SORTIN  DD  DSN=INFILE1,DISP=SHR                               
//SORTOUT DD  DSN=OUTFILE1,                                 
//           DISP=(,CATLG,DELETE),                                   
//           UNIT=SYSDA,                                             
//           SPACE=(TRK,(1,1))                                             
//SYSIN   DD  DSN=CNTLCARD(CARD1),DISP=SHR
//SYSOUT  DD  SYSOUT=*                                               
//        PEND                                                       
//MAINSTP EXEC PROCSRT                                                 
//SORTST.SORTIN DD DSN=INFILE2
//SORTOUT       DD DSN=OUTFILE2


If U have coded as a cataloged procedure u can do the same in the below way.

Code:
//**** JOB CARD ****
//MAINSTP EXEC PROCSRT                                                 
//SORTST.SORTIN DD DSN=INFILE2                               
//SORTOUT       DD DSN=OUTFILE2



I think both of the above should work fine.


Hope this helps,

Thanks
Sharan
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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm


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