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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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