We have a need to FTP a .csv file onto the mainframe, then we're going to load this directly to DB2. Only thing is, I want to replace some generic data (part of the audit fields) with a system generated value.
Now this would be easy enough with a 'normal' dataset, but because we need to use a .csv file, the data we need to replace will be at various different offsets. What i'm hoping to achieve is to replace 'RESUME' with 'AAnnnnnn' and the file could look something like this:
Code:
TEST1,100034,BLAH,BLAH,BLAH,RESUME,0001,2013-01-01-01.00.00.000000
TEST 2,3242,YADA,YADA,YADA,RESUME,0001,2013-01-01-01.00.00.000000
TEST333,34534575,X,Y,Z,RESUME,0001,2013-01-01-01.00.00.000000
Was wondering if I could use an OVERLAY, but not sure if this can be done without providing a fixed offset. Is this something which can be done in SORT or ICETOOL?
The string could appear elsewhere in these files(there are up to 200 different incoming file formats, which is why I wanted to do this as part of a global SORT rather than write a COBOL service).