View previous topic :: View next topic
|
Author |
Message |
atik
New User
Joined: 29 Jul 2005 Posts: 20
|
|
|
|
Hi all,
I am using Sort utility to Split the input file into 3 output file depending on a character in 3rd character
/SYSIN DD *
OPTION COPY
OUTFIL INCLUDE=(3,1,CH,EQ,C'a'),FNAMES=OUT1
OUTFIL INCLUDE=(3,1,CH,EQ,C'b'),FNAMES=OUT2
OUTFIL INCLUDE=(3,1,CH,EQ,C'c'),FNAMES=OUT3
But I want to move records to, say OUT1 if 3rd char is A or a. How to do this? If I give another OUTFIL INCLUDE with FNAMES OUT1, it is abending. |
|
Back to top |
|
|
jz1b0c
Active User
Joined: 25 Jan 2004 Posts: 160 Location: Toronto, Canada
|
|
|
|
Atik,
You should not give another OUTFIL INCLUDE, Perhaps you should write like below
OPTION COPY
OUTFIL INCLUDE=(3,1,CH,EQ,C'a',OR,3,1,CH,EQ,C'A'),FNAMES=OUT1
OUTFIL INCLUDE=(3,1,CH,EQ,C'b'),FNAMES=OUT2
OUTFIL INCLUDE=(3,1,CH,EQ,C'c'),FNAMES=OUT3 |
|
Back to top |
|
|
atik
New User
Joined: 29 Jul 2005 Posts: 20
|
|
|
|
Masade,
Its working fine. Thanks a lot. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's another way to do it with DFSORT:
Code: |
OPTION COPY
OUTFIL INCLUDE=(3,1,SS,EQ,C'aA'),FNAMES=OUT1
OUTFIL INCLUDE=(3,1,CH,EQ,C'b'),FNAMES=OUT2
OUTFIL INCLUDE=(3,1,CH,EQ,C'c'),FNAMES=OUT3
|
For more information on DFSORT's INCLUDE substring comparison tests (SS), see:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/3.7.4?DT=20050222160456 |
|
Back to top |
|
|
|
|