how to replace a string in member by REXX



IBM's Command List programming language & Restructured Extended Executor

how to replace a string in member by REXX

Postby Vadivelmainframe » Sun Mar 15, 2009 12:23 pm

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
Vadivelmainframe
 
Posts: 4
Joined: Sun Mar 15, 2009 11:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: how to replace a string in member by REXX

 

Re: how to replace a string in member by REXX

Postby MrSpock » Sun Mar 15, 2009 7:16 pm

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.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: how to replace a string in member by REXX

Postby expat » Tue Mar 17, 2009 5:31 pm

I prefer to use an ISPF edit macro which will work for one member or all members in the PDS.
expat
 
Posts: 382
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 1 time

Re: how to replace a string in member by REXX

Postby Vadivelmainframe » Wed Mar 18, 2009 11:11 pm

Could you please provide sample code it will help me

Thanks,
Vadivel R
Vadivelmainframe
 
Posts: 4
Joined: Sun Mar 15, 2009 11:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: how to replace a string in member by REXX

Postby MrSpock » Thu Mar 19, 2009 12:56 am

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.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post