Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

To search a string in a PS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
yogeshbabu

New User


Joined: 30 Nov 2005
Posts: 19
Location: India

PostPosted: Thu Mar 16, 2006 12:34 pm    Post subject: To search a string in a PS
Reply with quote

Hi,

I need to search a string say "XYZ" in a list of PS. Is there any utility available?

Thanks & Regards,
Yogesh
Back to top
View user's profile Send private message

krishnakanth
Warnings : 1

New User


Joined: 01 Feb 2006
Posts: 3

PostPosted: Thu Mar 16, 2006 3:22 pm    Post subject:
Reply with quote

Hi Yogesh,

u can do this task with concatenation.

anyone can suggest if this is not right

Thanks,
Krishnakanth
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 288
Location: Basel, Switzerland

PostPosted: Thu Mar 16, 2006 5:57 pm    Post subject:
Reply with quote

hy yogesh,

try in your ispf primary option menu,
option 3.14 or 3.15 (Search-for).

martin9
Back to top
View user's profile Send private message
yogeshbabu

New User


Joined: 30 Nov 2005
Posts: 19
Location: India

PostPosted: Thu Mar 16, 2006 6:50 pm    Post subject:
Reply with quote

I tried concatenating, but it doesnt help me out . Please let me know if any other possible ways of getting it done.

Regards,
Yogesh.
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 288
Location: Basel, Switzerland

PostPosted: Thu Mar 16, 2006 7:54 pm    Post subject:
Reply with quote

hy yogesh,

once more:
use the ispf utility...
you can choose this in batch mode and you get a job.
now concatenate all the libs desired,
with the same search for request...

martin9
Back to top
View user's profile Send private message
balajiofcrrcoe

New User


Joined: 07 Jul 2005
Posts: 41
Location: chennai

PostPosted: Thu Mar 16, 2006 8:01 pm    Post subject: Re: To search a string in a PS
Reply with quote

Hi,
Try the following code

//search job NOTIFY=&SYSUID,
// CLASS=B,MSGCLASS=X
//STEP01 EXEC PGM=ISRSUPC,PARM=(SRCHCMP,'ANYC')
//NEWDD DD DISP=SHR,DSN=file.tobe.searched
//OUTDD DD DISP=SHR,DSN=your.listing.file
//SYSIN DD *
SRCHFOR 'XYZ'
/*

result of search will be written in to OUTDD
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 288
Location: Basel, Switzerland

PostPosted: Thu Mar 16, 2006 8:25 pm    Post subject:
Reply with quote

hy yogesh,

you see, balajiofcrrcoe just did what i recommended,
the job he supplied is the genrated job by 3.14 or 3.15
--> in NEWDD make now the concatenation!

martin9
Back to top
View user's profile Send private message
balajiofcrrcoe

New User


Joined: 07 Jul 2005
Posts: 41
Location: chennai

PostPosted: Thu Mar 16, 2006 8:50 pm    Post subject: Re: To search a string in a PS
Reply with quote

Hi,
martin9 is correct this is 3.14,but when i have tried by concatening the files noticed that the search results of the last search in the concatenation were listed in the listing file.

so one thing what i can suggest you is submit the job in steps by opening the listing file(outdd) first in shr mode and from the second search onwards in append mode

just like this:-

//search job NOTIFY=&SYSUID,
// CLASS=B,MSGCLASS=X
//STEP01 EXEC PGM=ISRSUPC,PARM=(SRCHCMP,'ANYC')
//NEWDD DD DISP=SHR,DSN=file1.tobe.searched
//OUTDD DD DISP=SHR,DSN=your.listing.file
//SYSIN DD *
SRCHFOR 'XYZ'
/*
//STEP01 EXEC PGM=ISRSUPC,PARM=(SRCHCMP,'ANYC')
//NEWDD DD DISP=SHR,DSN=file2.tobe.searched
//OUTDD DD DISP=MOD,DSN=your.listing.file
//SYSIN DD *
SRCHFOR 'XYZ'
/*
//


Please let me know if we can do this in any other way or for any questions.
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 288
Location: Basel, Switzerland

PostPosted: Thu Mar 16, 2006 9:15 pm    Post subject:
Reply with quote

hy,

if this happens,
means that the utility opens and closes the OUTDD
for each single dataset in the concatenation...
therefore it is always overridden.
maybe you try DISP=MOD for OUTDD,
this appends also, even if you open/close it several times...

martin9
Back to top
View user's profile Send private message
yogeshbabu

New User


Joined: 30 Nov 2005
Posts: 19
Location: India

PostPosted: Sat Mar 18, 2006 1:09 am    Post subject: Re: To search a string in a PS
Reply with quote

Thanks a lot. It is working fine

Regards,
Yogesh
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us