View previous topic :: View next topic
|
Author |
Message |
rafael2009
New User
Joined: 21 May 2009 Posts: 18 Location: Mumbai
|
|
|
|
Hi,
I want to split the below input to different output files
input:
01 WERTYERWTY
02 RETHRETHRT
02 RETHRTHRTH
03 ERHERH444
04 555555555
05 666666666
06 777777777
06 ERHWRTHERH
99 999999999
Outfile1
01 WERTYERWTY
Outfile2
02 RETHRETHRT
02 RETHRTHRTH
Outfile3
03 ERHERH444
Outfile4
04 555555555
05 666666666
06 777777777
06 ERHWRTHERH
99 999999999 |
|
Back to top |
|
|
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
Hi Rafael,
You can use this:
Code: |
//STEP0 EXEC PGM=SYNCTOOL
//IN1 DD *
01 WERTYERWTY
02 RETHRETHRT
02 RETHRTHRTH
03 ERHERH444
04 555555555
05 666666666
06 777777777
06 ERHWRTHERH
99 999999999
//TOOLIN DD *
COPY FROM(IN1) USING(CTL1)
//CTL1CNTL DD *
OUTFIL FNAMES=OUTFIL1,INCLUDE=(1,2,CH,EQ,C'01')
OUTFIL FNAMES=OUTFIL2,INCLUDE=(1,2,CH,EQ,C'02')
OUTFIL FNAMES=OUTFIL3,INCLUDE=(1,2,CH,EQ,C'03')
OUTFIL FNAMES=OUTFIL4,SAVE
//OUTFIL1 DD SYSOUT=*
//OUTFIL2 DD SYSOUT=*
//OUTFIL3 DD SYSOUT=*
//OUTFIL4 DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
|
Thanks, Balu |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
Please state the "rules" to get the output -- |
And the Sort product/version installed in your shop. |
|
Back to top |
|
|
rafael2009
New User
Joined: 21 May 2009 Posts: 18 Location: Mumbai
|
|
|
|
Thanks everyone... it worked with SYNCTOOL ... the sort rule was that the 4th file should contain rest of recorts (apart from 01 02 03) |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
rafael2009,
You dont really need SYNCTOOL for this.
Code: |
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN= Input file
//OUTFIL1 DD SYSOUT=*
//OUTFIL2 DD SYSOUT=*
//OUTFIL3 DD SYSOUT=*
//OUTFIL4 DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=OUTFIL1,INCLUDE=(1,2,CH,EQ,C'01')
OUTFIL FNAMES=OUTFIL2,INCLUDE=(1,2,CH,EQ,C'02')
OUTFIL FNAMES=OUTFIL3,INCLUDE=(1,2,CH,EQ,C'03')
OUTFIL FNAMES=OUTFIL4,SAVE
/* |
|
|
Back to top |
|
|
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
I had a recent job in my spool with Icetool step, so just modified and pasted here!!
I hope there will not be any change in processing time from Icetool to sort.. Not sure
Thanks, Balu |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
I hope there will not be any change in processing time from Icetool to sort.. |
You can save a control card at least |
|
Back to top |
|
|
rafael2009
New User
Joined: 21 May 2009 Posts: 18 Location: Mumbai
|
|
|
|
Thanks a lot Arun... |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
You're welcome. |
|
Back to top |
|
|
|