Sequential File Header with Record Terminator
Posted: Wed Jan 16, 2013 9:05 am
I have a requirement from a vendor who wants record terminator characters on the header line as well as the detail data rows. They vendor requires the string "!##!" at the end of each record including the header. So the sample output should resemble:
Name|Address|Phone|!##!
Mary|1 Elm St.|000-0000|!##!
Bob|2 Front St|000-0000|!##!
Jack|1 2nd Ave|000-0000|!##!
I can create the record terminator for each detal row by appending their terminator string to the last field of data. Is there a way to accomplish this for the header row as well. I realize that I can save a header template files and then append the data by itself on each run. That isn't very flexible for adding/removing columns from the file. Any other ideas would be greatly appreciated.
Thanks,
Joe
Name|Address|Phone|!##!
Mary|1 Elm St.|000-0000|!##!
Bob|2 Front St|000-0000|!##!
Jack|1 2nd Ave|000-0000|!##!
I can create the record terminator for each detal row by appending their terminator string to the last field of data. Is there a way to accomplish this for the header row as well. I realize that I can save a header template files and then append the data by itself on each run. That isn't very flexible for adding/removing columns from the file. Any other ideas would be greatly appreciated.
Thanks,
Joe