Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 290
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: 290
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: 290
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: 290
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts String after '.' (period) is not copy... balaji81_k SYNCSORT 6 Wed Aug 23, 2017 9:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us