DFSORT - How to replace a file prefix with another String
Posted: Tue Jan 13, 2015 2:40 am
Hello,
This is quite simple to code programatically (in Cobol, rexx ect), but I wonder if it can be done through DFSORT ?
I have a file containing a file name (up to 44 bytes), followed by a 8 byte string (always in pos 46). I want to replace the 'high level qualifier' in position 1, with the 8 byte string, for example.
Input
Output
I've looked at the DFSORT manual, PARSE, OVERLAY, FINDREP, but I can't quite get this to work. I could write some rexx to do this, but is it possible in DFSORT ?
Thank you.
This is quite simple to code programatically (in Cobol, rexx ect), but I wonder if it can be done through DFSORT ?
I have a file containing a file name (up to 44 bytes), followed by a 8 byte string (always in pos 46). I want to replace the 'high level qualifier' in position 1, with the 8 byte string, for example.
Input
PROD.MY.TEST.FILE TEST
TEST.ANOTHER.FILE.OF.MINE DEV
TEST.ANOTHER.FILE.OF.MINE DEV
Output
TEST.MY.TEST.FILE
DEV.ANOTHER.FILE.OF.MINE
DEV.ANOTHER.FILE.OF.MINE
I've looked at the DFSORT manual, PARSE, OVERLAY, FINDREP, but I can't quite get this to work. I could write some rexx to do this, but is it possible in DFSORT ?
Thank you.