Page 1 of 1

Replace command like srchfor

PostPosted: Tue Jan 17, 2012 1:06 am
by zhinghur
Hello,

Do we have any commands to replace any text(say ab to xy) from different members in one PDS, without going and doing manual edit with c all command for each member?


Thanks,
Zhingur

Re: Replace command like srchfor

PostPosted: Tue Jan 17, 2012 1:54 am
by enrico-sorichetti
no...
You will have to write an edit macro

see here for an edit macro which applies an <inner> macro to all the members of the PDS being edited

http://ibmmainframes.com/about25947.html

You will have to write Your own <inner> macro to issue the change commands

Re: Replace command like srchfor

PostPosted: Tue Jan 17, 2012 1:57 am
by Akatsukami
enrico-sorichetti wrote:no...
You will have to write an edit macro

Can't this be done with a global edit?

Re: Replace command like srchfor

PostPosted: Tue Jan 17, 2012 2:13 am
by Peter_Mann
Globally change - what ? JCL, COBOL Source? ASM SOURCE ? PANEL- SKELS - MSGS?
there are products (FILEAID,PDSMAN) for example that can change text (ab to xy) in all or some PDS members, but you need to take care, for example; if the source is JCL, the utility is non forgiving, it will change (ab to xyz) with no problems, and not care if the changed text now created an invalid jcl statement, or invalid source statement, I agree with Enrico, learning to write an edit macro and ensuring your changed data is correct is the best route.
ISPF LM - services along with an edit macro can do whatever you need to do to a PDS
http://publib.boulder.ibm.com/infocente ... lmopen.htm

Re: Replace command like srchfor

PostPosted: Tue Jan 17, 2012 2:25 am
by enrico-sorichetti
as far as I remember ispf global change is available only by the ADD ON product
ISPF Productivity Tool
as described here
Improving Your Productivity with the ISPF Productivity Tool V5.9 on z/OS
http://www.redbooks.ibm.com/redbooks/pdfs/sg247587.pdf

Re: Replace command like srchfor

PostPosted: Tue Jan 17, 2012 5:04 am
by prino

Re: Replace command like srchfor

PostPosted: Tue Jan 17, 2012 11:23 pm
by zhinghur
Thank you everyone.