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 

Want to extract records based on particular name

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


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Fri Sep 28, 2007 2:01 am    Post subject: Want to extract records based on particular name Reply with quote

Hi,

I want to extract the records based on the particular value in the record,
for example i have input file with 100 rec's and in the file there are some records with value VISA in certain field.

I/p file

111111 SIVAKUMAR VISA .....
000000 VISA RAMA ...
333333 MASTER ANJAN
222222 SUMAN BHASKAR VISA
555555 AIZAZ MASTER

Now i want all the records which have value VISA any where in the records

Could anyone help me in this regard

Thanks
Siva
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Sep 28, 2007 3:58 am    Post subject: Re: Want to extract records based on particular name Reply with quote

sivafdms,

The below code would solve your purpose.
I assumed your input file length as 80.
Code:
//S1 EXEC PGM=ICEMAN               
//SYSOUT DD SYSOUT=*               
//SORTIN DD *                       
111111 SIVAKUMAR VISA .....         
000000 VISA RAMA ...               
333333 MASTER ANJAN                 
222222 SUMAN BHASKAR VISA           
555555 AIZAZ MASTER                 
//SORTOUT DD SYSOUT=*               
//SYSIN DD *                       
   OPTION COPY                     
   INCLUDE COND=(1,80,SS,EQ,C'VISA')
/*                                 


Output file:
Code:
111111 SIVAKUMAR VISA .....
000000 VISA RAMA ...       
222222 SUMAN BHASKAR VISA 
Back to top
View user's profile Send private message Send e-mail
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Fri Sep 28, 2007 4:21 am    Post subject: Reply with quote

Thanks Vkphani
It worked
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 -> 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