View previous topic :: View next topic
|
Author |
Message |
jaspal
New User
Joined: 22 May 2007 Posts: 68 Location: mumbai
|
|
|
|
Hi all,
i need to write a sort card by which i can select the records from file having first three filelds should be alphanumeric ( from A to Z only)
EXAMPLE:
consider a file with keys
Code: |
123456
werrr34
443435
trtrtrtrtr
|
we need the records
in output file
regards,
Jaspal Singh |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Jaspal,
It's not an optimal soution but u can get ur desired result using following sort card
Code: |
OPTION COPY
INCLUDE COND=((1,1,CH,GE,C'a',AND,1,1,CH,LE,C'z'),
AND,(2,1,CH,GE,C'a',AND,2,1,CH,LE,C'z'),
AND,(3,1,CH,GE,C'a',AND,3,1,CH,LE,C'z')) |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
having first three filelds should be alphanumeric ( from A to Z only) |
Where are 3 fields? I see only 1.
A to Z is not alphanumeric - it is alphabetic.
Please post a more complete example of your 3 fields and desired output. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Jaspal,
If what you really want is the records where the first three characters are not numeric, you can use these DFSORT control statements:
Code: |
OPTION COPY
INCLUDE COND=(1,3,FS,NE,NUM)
|
If you want something else, please explain in detail what you want (and don't confuse uppercase with lowercase if it matters). |
|
Back to top |
|
|
jaspal
New User
Joined: 22 May 2007 Posts: 68 Location: mumbai
|
|
|
|
thanks guptae for the solution its working fine |
|
Back to top |
|
|
|
|