Page 1 of 1

Replace a COLUMN of dataset by another COLUMN of dataset

PostPosted: Thu Nov 13, 2008 12:14 am
by parthiban
Hi..
I just want to replace a COLUMN of dataset by another COLUMN of dataset and put in another ps using rexx...

Thanks,
Parthiban j

Re: rexx

PostPosted: Thu Nov 13, 2008 1:03 am
by dick scherrer
Hello,

It will probably help if you post some "input" and the "output" you want from that input.

Most often, this type of work is better done using the sort or some other utility (like FileAid), rather than rexx.

Re: rexx

PostPosted: Thu Nov 13, 2008 4:24 am
by chidams78
Hello,

For replacing data in strings, you can make use of the OVERLAY function in REXX
The syntax is
OVERLAY('source string', 'target string', start pos, end pos)

You need to read each line of record till EOF and replace the data on each read by OVERLAY function
Hope this helps.

Thanks
Chidam