Apologies, my bad. I should've uploaded the file. Attached is a masked .dat file renamed as .txt for uploading.
On opening it with notepad++ in Windows, the null characters show up as boxes. In a Linux vi the nulls are ^@.
All the records in this file are in one row. This particular file has 2 records followed by the trailer record.
- First record = starts at the beginning of the file 00000230 (this field gives the length of the record in bytes)
- Second record = starts at the next 00000230 (it is a coincidence, here both records have same length)
- Trailer record = starts at 0000096 (the trailer length is of 96 bytes and it also has 80 delimiters of ^@ or null characters. Ignore my earlier post saying trailer has 20 delimiters. It has 80 actually)
As the field lengths are variable so we cannot define a record in terms of total length of its fields or total bytes. This is why we are defining a record as effectively having length of 80 ^@ delimiters.
I require the 1st record in one row, 2nd record in next row and so on till the end of the file, with the trailer in the last row. If there is a way of adding a newline after every 80th ^@ from the beginning till the eof, then perhaps it will work?
The only unprintable character is null ^@, no TABS or other spaces, all other characters are alphanumeric.
Please let me know if any questions. Thanks for the help