find a string in a pds member



IBM's Command List programming language & Restructured Extended Executor

find a string in a pds member

Postby sundarhere » Thu Mar 21, 2013 11:19 pm

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
sundarhere
 
Posts: 3
Joined: Thu Mar 21, 2013 11:06 pm
Has thanked: 0 time
Been thanked: 0 time

Re: find a string in a pds member

Postby Akatsukami » Thu Mar 21, 2013 11:22 pm

Why are you wasting your employer's time duplicating SRCHFOR?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: find a string in a pds member

Postby sundarhere » Thu Mar 21, 2013 11:48 pm

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
sundarhere
 
Posts: 3
Joined: Thu Mar 21, 2013 11:06 pm
Has thanked: 0 time
Been thanked: 0 time

Re: find a string in a pds member

Postby steve-myers » Fri Mar 22, 2013 12:23 am

sundarhere wrote:See srchfor will search all the member in a pds. ...
Not true. You can tell SRCHFOR to just scan one member.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: find a string in a pds member

Postby NicC » Fri Mar 22, 2013 12:49 am

Search the copybook PDS not the source code PDS.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: find a string in a pds member

Postby Pedro » Fri Mar 22, 2013 5:49 am

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.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: find a string in a pds member

Postby sundarhere » Fri Mar 22, 2013 10:00 pm

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
sundarhere
 
Posts: 3
Joined: Thu Mar 21, 2013 11:06 pm
Has thanked: 0 time
Been thanked: 0 time

Re: find a string in a pds member

Postby Pedro » Sat Mar 23, 2013 1:49 am

You did not reply to Akatsukami's question... the first response to your initial post.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post