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 

Extract Only Alphabets from the Key Field

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
gharidoss
Beginner


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Thu Dec 01, 2005 3:34 am    Post subject: Extract Only Alphabets from the Key Field Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Dec 01, 2005 5:34 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
gharidoss
Beginner


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Thu Dec 01, 2005 5:43 am    Post subject: Reply with quote

Hi Kolusu

I tried based on your code. it's working fine.


Thanks a lot
Hari
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Alain Benveniste
Beginner


Joined: 04 May 2003
Posts: 92
Topics: 4
Location: Paris, France

PostPosted: Thu Dec 01, 2005 8:26 am    Post subject: Reply with quote

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
View user's profile Send private message
gharidoss
Beginner


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Fri Dec 02, 2005 3:22 am    Post subject: Reply with quote

Hi Alain,

Sorry the late reply...

I tested your code, it's working fine...

Thanks a lot...

Hari
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities 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