text split in rexx
Posted: Sun Jun 03, 2012 1:27 am
I'm working on migration. If i have a copybook in the below format, whenever line has //(double slash) it must be shifted into other line as a comment. How can I achieve this using REXX (OR MACROS).
INPUT:
Desired OUTPUT:
INPUT:
01 group.
05 st-details pic 9(8) //student no,class
05 st-address pic x(10) //student address, zip-code
05 st-details pic 9(8) //student no,class
05 st-address pic x(10) //student address, zip-code
Desired OUTPUT:
01 group.
05 st-details pic 9(8).
*student no,class (comment)
05 st-address pic x(10).
*student address,zipcode(comment)
05 st-details pic 9(8).
*student no,class (comment)
05 st-address pic x(10).
*student address,zipcode(comment)