Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

sort card to select records with first 3 words as alpha

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: sort card to select records with first 3 words as alpha
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: 1187
Location: Bangalore,India

PostPosted: Tue Sep 25, 2007 3:26 pm    Post subject:
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

Site Director


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

PostPosted: Tue Sep 25, 2007 8:39 pm    Post subject:
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 Moderator


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

PostPosted: Tue Sep 25, 2007 8:43 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us