MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
gharidoss Beginner Joined: 14 Mar 2005 Posts: 38 Topics: 15 Location: Bangalore
Posted: Thu Dec 01, 2005 3:34 am Post subject: Extract Only Alphabets from the Key Field
Hi All,
It's possible to extract the only alphabets from the key field
Example:Key Field
1000
100A
738T
7E35
73GT
Y600
4000
....
....
....
....
7GG5
Desired output (Records which contains alphabets in Key field)
100A
738T
7E35
73GT
Y600
7GG5
I acheived this by using following code
Code:
SORT FIELDS=COPY
INCLUDE COND=(1,4,SS,EQ,C'A',OR,
...
...
INCLUDE COND=(1,4,SS,EQ,C'Z')
is there any other solution for this?
Any ideas would be greatly appreciated...
Thanks,
Hari
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu Dec 01, 2005 5:34 am Post subject:
gharidoss ,
Try this
Code:
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(1,1,SS,EQ,C'ABCDEFGHIJKLMNOPQRSTUVWXYZ',OR,
2,1,SS,EQ,C'ABCDEFGHIJKLMNOPQRSTUVWXYZ',OR,
3,1,SS,EQ,C'ABCDEFGHIJKLMNOPQRSTUVWXYZ',OR,
4,1,SS,EQ,C'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
/*
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
gharidoss Beginner Joined: 14 Mar 2005 Posts: 38 Topics: 15 Location: Bangalore
Posted: Thu Dec 01, 2005 5:43 am Post subject:
Hi Kolusu
I tried based on your code. it's working fine.
Thanks a lot
Hari
Back to top
Alain Benveniste Beginner Joined: 04 May 2003 Posts: 92 Topics: 4 Location: Paris, France
Posted: Thu Dec 01, 2005 8:26 am Post subject:
Garidoss,
Here is a sample that dispatches good and bad records into 2 different files
Code:
//STEP0001 EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//IN DD *
00
99
0A
AA
/*
//TOOLIN DD *
COPY FROM(IN) USING(ICE0)
/*
//OUTX DD SYSOUT=*
//OUTY DD SYSOUT=*
//ICE0CNTL DD *
OUTFIL FNAMES=OUTX,
INCLUDE=(1,2,BI,ALL,X'F0F0')
OUTFIL FNAMES=OUTY,
INCLUDE=(1,2,BI,NOTALL,X'F0F0')
/*
Alain
Back to top
gharidoss Beginner Joined: 14 Mar 2005 Posts: 38 Topics: 15 Location: Bangalore
Posted: Fri Dec 02, 2005 3:22 am Post subject:
Hi Alain,
Sorry the late reply...
I tested your code, it's working fine...
Thanks a lot...
Hari
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