View previous topic :: View next topic |
Author |
Message |
maxisnowhere Beginner

Joined: 25 May 2005 Posts: 59 Topics: 20
|
Posted: Fri May 30, 2008 10:32 am Post subject: Split a file into 2 checking 2 fields |
|
|
Hi Guys,
I have a small problem but have no idea on how to solve it.
I have a file like:
I want to split the cases with column 2 = column3 and the others, so i want two output like:
file 1:
file 2:
I couldn't find anythink....sorry and thanks! _________________ Maxisnowhere |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri May 30, 2008 10:39 am Post subject: |
|
|
maxisnowhere,
The following DFSORT JCL will give you the desired results
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
1AS
2BB
3CG
4DD
//OUT1 DD SYSOUT=*
//OUT2 DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=OUT1,INCLUDE=(2,1,CH,EQ,3,1,CH)
OUTFIL FNAMES=OUT2,SAVE
/* |
Hope this helps...
Cheers _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
maxisnowhere Beginner

Joined: 25 May 2005 Posts: 59 Topics: 20
|
Posted: Fri May 30, 2008 10:40 am Post subject: |
|
|
mmmm thanks a lottttt!!! _________________ Maxisnowhere |
|
Back to top |
|
 |
|
|