View previous topic :: View next topic
|
Author |
Message |
prasadrachuri
New User
Joined: 19 Aug 2003 Posts: 20 Location: kolkata
|
|
|
|
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 |
|
 |
mcmillan
Site Admin

Joined: 18 May 2003 Posts: 1211 Location: India
|
|
|
|
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 |
|
 |
prasadrachuri
New User
Joined: 19 Aug 2003 Posts: 20 Location: kolkata
|
|
|
|
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 |
|
 |
mcmillan
Site Admin

Joined: 18 May 2003 Posts: 1211 Location: India
|
|
|
|
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 |
|
 |
prasadrachuri
New User
Joined: 19 Aug 2003 Posts: 20 Location: kolkata
|
|
|
|
//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 |
|
 |
Sharan
New User
Joined: 22 Dec 2003 Posts: 6 Location: Banaglore
|
|
|
|
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 |
|
 |
|