Convert VB to FB, pre-pend a value, extend LRECL
Posted: Fri Oct 12, 2012 2:33 pm
After my usual struggle with the manuals, google, fora searches I am still getting nowhere!
Take a VB file, prepend a static value at the front, write out the record as FB and with a far larger LRECL. My test file is LRECL of 300 (data 296 + 4 RDW) and the longest record is 214 bytes - 218 with RDW. My target LRECL is 500. The value to prepend is 'TAX;' (sans quotes so 4 bytes). I reckon I should have control cards doing something along the lines of:
Errr, hmmmm.... just tried that combination and it worked! But I will post anyway as it may help someone else (or me when I need to do something similar down the track).
Take a VB file, prepend a static value at the front, write out the record as FB and with a far larger LRECL. My test file is LRECL of 300 (data 296 + 4 RDW) and the longest record is 214 bytes - 218 with RDW. My target LRECL is 500. The value to prepend is 'TAX;' (sans quotes so 4 bytes). I reckon I should have control cards doing something along the lines of:
OPTION COPY
OUTFIL BUILD=('TAX;',5,296,500:x),VTOF
OUTFIL BUILD=('TAX;',5,296,500:x),VTOF
Errr, hmmmm.... just tried that combination and it worked! But I will post anyway as it may help someone else (or me when I need to do something similar down the track).