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 

searching a string in a pds of Jcl + procs excluding comment

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Tue Aug 23, 2005 6:16 am    Post subject: searching a string in a pds of Jcl + procs excluding comment Reply with quote

searching a string in a pds of Jcl and procs excluding comments line.
a fileaid batch jcl which will search for a string in a PDS (contains jcl procs) containing around 400 members and return the member name and position of the string in that particular member.
This is working fine but I like to exclude comment lines.(//* or *)


Code:

//FASTEP   EXEC PGM=FILEAID,REGION=6M                     
//*TEPLIB  DD  DISP=SHR,DSN=SUPT.FILEAID.LOAD       
//SYSPRINT DD  SYSOUT=*                                   
//SYSLIST  DD  SYSOUT=*                                   
//DD01     DD  DSN=Ak.COB.SRC,                         
//             DISP=SHR                                   
//DD01SC   DD  DSN=Ak.FILEAID.SC.T41(SELECT)
//             DISP=(OLD,DELETE)                           
//SYSIN    DD  *                                           
$$DD01 LIST  FORM=JCL                                     
/*                                                         
//                           
                             
[/code]
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Aug 23, 2005 6:54 am    Post subject: Reply with quote

vak255,

Try the following Sysin cards.

Code:

//SYSIN    DD *                 
$$DD01 LIST IF=(1,0,C'your search string'),
            AND=(1,NE,C'//*')   
/*                             

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Aug 23, 2005 7:16 am    Post subject: Reply with quote

vak255,

Alternatively you can use the option 3.14 or 3.15 to search dropping the comment lines. You use the parm DPLINE which exclude lines if "//*" found in columns 1:3

Code:

//SEARCH  EXEC PGM=ISRSUPC,                                           *
//            PARM=(SRCHCMP,                                           
//            '')                                                     
//NEWDD  DD DSN=YOUR PDS TO BE SEARCHED, 
//          DISP=SHR         
//OUTDD  DD SYSOUT=(*)       
//SYSIN  DD *
SRCHFOR  'YOUR SEARCH STRING'
DPLINE   '//*',1:3
/*


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
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Tue Aug 23, 2005 7:36 am    Post subject: Reply with quote

thanks kolusu, but the real problem is , how to drop the comments which are on the end of the statement...

Quote:

//SEARCH EXEC PGM=ISRSUPC, *
// PARM=(SRCHCMP,
// '')
//NEWDD DD DSN=YOUR PDS TO BE SEARCHED, *comments
// DISP=SHR *comments
//OUTDD DD SYSOUT *comments
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Aug 23, 2005 8:00 am    Post subject: Reply with quote

Quote:

how to drop the comments which are on the end of the statement...


vak255,

huh ! I am lost here !

Do you want to drop the lines which has //* at the end of statement? Show us an example with a sample input and desired output !

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Tue Aug 23, 2005 8:33 am    Post subject: Reply with quote

sorry for the confusion.I want to exclude the comments , which I have underlined.I don't have the data now, anyway thanks for all the help.


Quote:

//SEARCH EXEC PGM=ISRSUPC, *
// PARM=(SRCHCMP,
// '')
//NEWDD DD DSN=YOUR PDS TO BE SEARCHED, *comments
// DISP=SHR *comments
//OUTDD DD SYSOUT *comments
[/code][/b]
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 -> Job Control Language(JCL) 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