IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

sort card to select records with first 3 words as alpha


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jaspal

New User


Joined: 22 May 2007
Posts: 68
Location: mumbai

PostPosted: Tue Sep 25, 2007 3:15 pm
Reply with quote

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

Code:

werrr34
trtrtrtrtr


in output file

regards,
Jaspal Singh
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Tue Sep 25, 2007 3:26 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 25, 2007 8:39 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Sep 25, 2007 8:43 pm
Reply with quote

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
View user's profile Send private message
jaspal

New User


Joined: 22 May 2007
Posts: 68
Location: mumbai

PostPosted: Wed Sep 26, 2007 10:36 am
Reply with quote

thanks guptae for the solution its working fine
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top