Posted: Wed Jul 16, 2003 3:09 pm Post subject: eliminate non alphanumeric & numeric data..
Hi.
I have file of 80 lrec.. and I want the data having only either A-B OR 0-9 in one file and remaining data in other file.. Can you suggest some sort utility ..if possible canyou paste here..
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Jul 16, 2003 4:15 pm Post subject:
Anand,
I'm not sure what you mean by "the data having only either A-B or 0-9", but I'll assume you mean data having A-B or 0-9 in some particular position in the file - let's say in position 11. Here's an example of how to do that with DFSORT:
Code:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=
//SORTIN DD DSN=... input file
//OUT1 DD DSN=... output file with A, B and 0-9
//OUT2 DD DSN=... output file with rest
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=OUT1,
INCLUDE=(11,1,SS,EQ,C'AB0123456789')
OUTFIL FNAMES=OUT2,SAVE
/*
If that's not what you want to do, then please clarify. A sample of your input and what you want for the output would help. _________________ 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
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Jul 23, 2003 3:00 pm Post subject:
Anand,
So if I understand correctly, you want the records that contain any character other than blank, A-Z or 0-9 anywhere from positions 1-80 in the BAD file, and records that contain only blank, A-Z or 0-9 in all characters in the GOOD file. That's a little harder than the original request, but this DFSORT job will do it:
Code:
//S1 EXEC PGM=ICEMAN
//SYMNAMES DD *
CHK,C' ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
B01,1,1
B02,*,1
B03,*,1
B04,*,1
B05,*,1
B06,*,1
B07,*,1
B08,*,1
B09,*,1
B10,*,1
B11,*,1
B12,*,1
B13,*,1
... continue with B14 to B80
B80,*,1
//SYSOUT DD SYSOUT=*
//SORTIN DD *
THIS IS GOOD DATA 126543
THIS IS BAD$#@DATA87698
//BAD DD SYSOUT=*
//GOOD DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=BAD,
INCLUDE=(B01,SS,NE,CHK,OR,B02,SS,NE,CHK,OR,B03,SS,NE,CHK,OR,
B04,SS,NE,CHK,OR,B05,SS,NE,CHK,OR,B06,SS,NE,CHK,OR,
B07,SS,NE,CHK,OR,B08,SS,NE,CHK,OR,B09,SS,NE,CHK,OR,
B10,SS,NE,CHK,OR,B11,SS,NE,CHK,OR,B12,SS,NE,CHK,OR,
B13,SS,NE,CHK, ... continue with B14 to B79
B80,SS,NE,CHK)
OUTFIL FNAMES=GOOD,SAVE
/*
_________________ 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
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu Jul 31, 2003 2:41 pm Post subject:
Anand,
Based on your error messages(WER....) it is evident that you have syncsort at your shop. Syncsort does not support the use of symbols like DFSORT does. so try the following JCl.
Code:
//STEP10 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
THIS IS GOOD DATA 126543
THIS IS BAD$#@DATA87698
//BAD DD SYSOUT=*
//GOOD DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=GOOD,
INCLUDE=(12,1,SS,EQ,C' ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',AND,
13,1,SS,EQ,C' ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',AND,
14,1,SS,EQ,C' ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789')
OUTFIL FNAMES=BAD,SAVE
/*
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