Page 1 of 1

find a string in a pds member

PostPosted: Thu Mar 21, 2013 11:19 pm
by sundarhere
Hi,
I am developing a rexx tool to find the associated copybokk for a variable in a cobol program. I would like to search say for ex
Emp-Name in xxx.xxxxx.xxxx (yyy)
So it should say yyy

I have developed most of the part. But finding the string in dsn member (note : not dsn. Its dsn member) fails. I am trying usung Isuprc. Pls suggest.

Thanks

Re: find a string in a pds member

PostPosted: Thu Mar 21, 2013 11:22 pm
by Akatsukami
Why are you wasting your employer's time duplicating SRCHFOR?

Re: find a string in a pds member

PostPosted: Thu Mar 21, 2013 11:48 pm
by sundarhere
See srchfor will search all the member in a pds. My idea is to find the copybook of the variable used in a prog. Istead of searching million of lines in all member of the production pds strip the copybooks which are used in tat program I.e few copybooks. Also it will take time in secs not mins which we usally do in srchfor

Re: find a string in a pds member

PostPosted: Fri Mar 22, 2013 12:23 am
by steve-myers
sundarhere wrote:See srchfor will search all the member in a pds. ...
Not true. You can tell SRCHFOR to just scan one member.

Re: find a string in a pds member

PostPosted: Fri Mar 22, 2013 12:49 am
by NicC
Search the copybook PDS not the source code PDS.

Re: find a string in a pds member

PostPosted: Fri Mar 22, 2013 5:49 am
by Pedro
finding the string in dsn member ... fails. I am trying usung Isuprc.

You did not provide details of what you are searching for, where you are searching, how you are searching for it and details of the failure. It is not clear what you are trying... did you mean ISRSUPC? (ISRSUPC is the module name for the SRCHFOR utility , so maybe you are talking about the same thing as others).

I have a feeling that NicC's suggestion is probably the right solution.

BTW, re: Isuprc ... this is a technical forum. Mis-typing a key piece of information just wastes everyone's time. Please strive to be accurate.

Re: find a string in a pds member

PostPosted: Fri Mar 22, 2013 10:00 pm
by sundarhere
Hi all

I found the way. Thanks

I did thru simple search.

Read the pds member into stem and searched using index thru iteration



A = index

Re: find a string in a pds member

PostPosted: Sat Mar 23, 2013 1:49 am
by Pedro
You did not reply to Akatsukami's question... the first response to your initial post.