I’m extracting data from a file with variable width records (i.e. Header, detail and Trailer records). I’ve done this may times previously using the COBOL copybook format.
The new challenge is that I have a new data file which contains an embedded linefeed character along with the normal carriage return at the end of each line. The copybook is having trouble handling this and results in twice as many rows as expected - every second line is completely blank.
I’ve tried modifying the copybook definition of ‘Record Trailer Length’ which hasn’t helped. I’ve also tried defining the copybook to ignore the last column in the file which also hasn’t helped.
Has anyone else managed to get round this issue?
I’m trying to get the upstream system to stop including the linefeed, but I’d like to see if copybooks can cope with ‘unhelpful’ input data.
Nemesis (BOB member since 2004-06-09)