View previous topic :: View next topic
|
Author |
Message |
Mazahar
New User
Joined: 11 Dec 2007 Posts: 82 Location: hyderabad
|
|
|
|
Hi All,
Can any one assist me here please
i have lakhs of records like this in a 15 byte FB file
A12345
B12345
C12345
D12345
AA1234
AB1234
AC1234
AD1234
I want to get the records which are having second byte as character in a output file.
AA1234
AB1234
AC1234
AD1234
I know wo options
1) include condition with EQ for 26 characters
2) include condition with NE for 0 to 9
other thans this any other way? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
try this
Code: |
INCLUDE COND=(2,1,CH,GE,C'A',AND,2,1,CH,LE,C'Z') |
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
does byte 2 of the input data only contain the 26 letters of the alphabet and numbers 0-9.
The reason I'm asking is that are other values between A thru Z.
Gerry |
|
Back to top |
|
|
Mazahar
New User
Joined: 11 Dec 2007 Posts: 82 Location: hyderabad
|
|
|
|
Expat,
It Worked thanks
Gcicchet,
Yes It may contain Alphabets as well numbers, but i need only the records which are having 2 byte as alphabets.
Expat solution worked for me. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
This simpler DFSORT INCLUDE statement would work too:
Code: |
INCLUDE COND=(2,1,FS,NE,NUM)
|
|
|
Back to top |
|
|
Mazahar
New User
Joined: 11 Dec 2007 Posts: 82 Location: hyderabad
|
|
|
|
Frank,
Can you please tell me What is FS in u r statement? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Frank's solution is most likely the best, but if you used expat's taking into account Gerry's post, you could split up the A-Z range into 3 ranges of A-I, J-R, and S-Z to eliminate those "extra" characters. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Note that the NUM solution actually includes anything other than '0'-'9'. If only 'A'-'Z' is to be included, then the NUM solution won't work. Guess it depends on what Mazhar means by "Alphabets" - I took it to mean any non-numeric, not just 'A'-'Z'. |
|
Back to top |
|
|
Mazahar
New User
Joined: 11 Dec 2007 Posts: 82 Location: hyderabad
|
|
|
|
thanks to all |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Frank Yaeger wrote: |
Note that the NUM solution actually includes anything other than '0'-'9'. If only 'A'-'Z' is to be included, then the NUM solution won't work. Guess it depends on what Mazhar means by "Alphabets" - I took it to mean any non-numeric, not just 'A'-'Z'. |
The COBOL definition of the ALPHABETIC class is A-Z and space. |
|
Back to top |
|
|
|