MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
mainhead Beginner Joined: 07 Feb 2006 Posts: 26 Topics: 11
Posted: Thu Feb 09, 2006 2:12 am Post subject: OMIT lowercase records using sort utility
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
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Feb 09, 2006 8:12 am Post subject:
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
Frank Yaeger Sort Forum Moderator Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Feb 09, 2006 12:23 pm Post subject:
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
mainhead Beginner Joined: 07 Feb 2006 Posts: 26 Topics: 11
Posted: Thu Feb 09, 2006 12:30 pm Post subject: Thanks
Thanks Frank - Kolusu
Back to top
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