Oct 16, 2008 #1 selva0202 IS-IT--Management Joined Oct 16, 2008 Messages 4 Location US Hi Guys, I've got the following requirement. A string 'ABC' is available in multiple physical sequence dataset. They need be changed with 'XYZ' Am not familiar with REXX. So, can someone help me in this? -Selva
Hi Guys, I've got the following requirement. A string 'ABC' is available in multiple physical sequence dataset. They need be changed with 'XYZ' Am not familiar with REXX. So, can someone help me in this? -Selva
Oct 17, 2008 #2 mikrom Programmer Joined Mar 27, 2002 Messages 3,017 Location SK REXX hat lot of functions to operate with strings. So you can use e.g.: Code: mystring="xyABCz p q ABC t u" say "before: '"||mystring||"'" mystring=CHANGESTR("ABC",mystring,"XYZ") say "after : '"||mystring||"'" which results in Code: before: 'xyABCz p q ABC t u' after : 'xyXYZz p q XYZ t u' However, you need first to read records from your physical file. How to do it, depends on your platform. Upvote 0 Downvote
REXX hat lot of functions to operate with strings. So you can use e.g.: Code: mystring="xyABCz p q ABC t u" say "before: '"||mystring||"'" mystring=CHANGESTR("ABC",mystring,"XYZ") say "after : '"||mystring||"'" which results in Code: before: 'xyABCz p q ABC t u' after : 'xyXYZz p q XYZ t u' However, you need first to read records from your physical file. How to do it, depends on your platform.