MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OMIT lowercase records using sort utility

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
mainhead
Beginner


Joined: 07 Feb 2006
Posts: 26
Topics: 11

PostPosted: Thu Feb 09, 2006 2:12 am    Post subject: OMIT lowercase records using sort utility Reply with quote

Has this related to be Jcl part iam posting over here

Please could you help up with this

I have input file which iam copying to ANOTHER file which is output

Input record length of 80 for example
----+----1----+----2----+----3----+----4----+-
02362,A1B, ,P,J,200545,000000,000000000,000100

and i want only to check 7 - 9 ie 'A1B' fields to check it whether its upper case or lower case , if lower case not to copy .

Can i overcome this record by sort utility .

Many Thanks on your replies !!
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Feb 09, 2006 8:12 am    Post subject: Reply with quote

Try this

Code:

//STEP0100 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD *                                               
02362,A1B, ,P,J,200545,000000,000000000,000100               
02361,aac, ,P,J,200545,000000,000000000,000100               
//SORTOUT  DD SYSOUT=*                                       
//SYSIN    DD *                                               
 SORT FIELDS=COPY                                             
 OMIT COND=(7,1,SS,EQ,                                       
 X'818283848586878889919293949596979899A2A3A4A5A6A7A8A9',OR, 
            8,1,SS,EQ,                                       
 X'818283848586878889919293949596979899A2A3A4A5A6A7A8A9',OR, 
            9,1,SS,EQ,                                       
 X'818283848586878889919293949596979899A2A3A4A5A6A7A8A9')     
/*                                                           


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Feb 09, 2006 12:23 pm    Post subject: Reply with quote

Note that Kolusu's job can be simplified to the following DFSORT job:

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SYMNAMES DD *
lc,'abcdefghijklmnopqrstuvwxyz'
//SORTIN   DD *
02362,A1B, ,P,J,200545,000000,000000000,000100
02361,aac, ,P,J,200545,000000,000000000,000100
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT FIELDS=COPY
  OMIT COND=(7,1,SS,EQ,lc,OR,
             8,1,SS,EQ,lc,OR,
             9,1,SS,EQ,lc)
/*


Alternatively, assuming that you don't have any oddball characters in the gaps between 'a'-'z' (e.g. X'8A'), you could use this DFSORT OMIT statement:

Code:

  OMIT COND=((7,1,CH,GE,C'a',AND,7,1,CH,LE,C'z'),OR,   
             (8,1,CH,GE,C'a',AND,8,1,CH,LE,C'z'),OR,   
             (9,1,CH,GE,C'a',AND,9,1,CH,LE,C'z'))     

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mainhead
Beginner


Joined: 07 Feb 2006
Posts: 26
Topics: 11

PostPosted: Thu Feb 09, 2006 12:30 pm    Post subject: Thanks Reply with quote

Thanks Frank - Kolusu
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group