Replace a COLUMN of dataset by another COLUMN of dataset

IBM's Command List programming language & Restructured Extended Executor
parthiban
Posts: 66
Joined: Mon Oct 20, 2008 7:54 pm
Skillset: REXX,JCL,RACF
Referer: Google
Location: Bangalore-India
Contact:

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

User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am

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.

chidams78
Posts: 16
Joined: Fri Sep 19, 2008 6:35 pm
Skillset: JCL / COBOL / DB2
Referer: Internet

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


  • Similar Topics
    Replies
    Views
    Last post