Replace a COLUMN of dataset by another COLUMN of dataset



IBM's Command List programming language & Restructured Extended Executor

Replace a COLUMN of dataset by another COLUMN of dataset

Postby parthiban » Thu Nov 13, 2008 12:14 am

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
Parthiban jayaraman
mainframe rexxer,
Banglore
parthiban
 
Posts: 66
Joined: Mon Oct 20, 2008 7:54 pm
Location: Bangalore-India
Has thanked: 0 time
Been thanked: 0 time

Re: Replace a COLUMN of dataset by another COLUMN of dataset

 

Re: rexx

Postby dick scherrer » Thu Nov 13, 2008 1:03 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: rexx

Postby chidams78 » Thu Nov 13, 2008 4:24 am

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
chidams78
 
Posts: 17
Joined: Fri Sep 19, 2008 6:35 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post