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

overriding sort I/P and O/P files


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 1210
Location: India

PostPosted: Wed Aug 20, 2003 3:40 pm
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
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: 1210
Location: India

PostPosted: Thu Aug 21, 2003 9:06 am
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 4
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top