Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sample REXX rexx coding is required

Status
Not open for further replies.

selva0202

IS-IT--Management
Oct 16, 2008
4
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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top