IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To search a string in a PS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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: 290
Location: Basel, Switzerland

PostPosted: Thu Mar 16, 2006 5:57 pm
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
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: 290
Location: Basel, Switzerland

PostPosted: Thu Mar 16, 2006 7:54 pm
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
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: 290
Location: Basel, Switzerland

PostPosted: Thu Mar 16, 2006 8:25 pm
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
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: 290
Location: Basel, Switzerland

PostPosted: Thu Mar 16, 2006 9:15 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts file manager is doing string conversion IBM Tools 3
Search our Forums:

Back to Top