Page 1 of 1
how to replace a string in member by REXX
Posted:
Sun Mar 15, 2009 12:23 pm
by Vadivelmainframe
Hi,
My Requirement is,
list the member in a PDS and search the input string in a member and then replace the string by new string
any one help me on this
By,
Vadivel
Re: how to replace a string in member by REXX
Posted:
Sun Mar 15, 2009 7:16 pm
by MrSpock
When I think of a search-and-replace process, outside of using the standard utilities like IPOUPDTE or DFSORT, then I think of using an editor, especially if the strings may be of different lengths. There are different methods that you can use in REXX, using functions like POS, PARSE, LEFT, RIGHT, or WORD to identify a string, and functions like string concatenation, OVERLAY, SUBSTR, etc. to change string content.
Re: how to replace a string in member by REXX
Posted:
Tue Mar 17, 2009 5:31 pm
by expat
I prefer to use an ISPF edit macro which will work for one member or all members in the PDS.
Re: how to replace a string in member by REXX
Posted:
Wed Mar 18, 2009 11:11 pm
by Vadivelmainframe
Could you please provide sample code it will help me
Thanks,
Vadivel R
Re: how to replace a string in member by REXX
Posted:
Thu Mar 19, 2009 12:56 am
by MrSpock
Sample code for what? How do you want to accomplish this task? It would be better if you would post YOUR code and tell us where you're having a problem or where you're not sure of what to do.