Sequential file - Record delimiter
Posted: Fri Oct 21, 2005 2:28 am
Hello,
I am writing records to a sequential file and then using a shell script to split the file. The record delimiter is 'UNIX Newline' and the final delimiter is 'end'.
There are 2 columns in the file and the second column is a VarChar(2000). The second column itself contains double quotes. When I use an awk command to retrieve the second column, only a partial string is retrieved.
If I open the file and manually, press enter at the end of every record and delete the line (effectively put a UNIX newline at the end), the awk statement gives the correct results.
What could be the reason for this? What change should I make to ensure that the file is read correctly.
Regards,
Bakul
I am writing records to a sequential file and then using a shell script to split the file. The record delimiter is 'UNIX Newline' and the final delimiter is 'end'.
There are 2 columns in the file and the second column is a VarChar(2000). The second column itself contains double quotes. When I use an awk command to retrieve the second column, only a partial string is retrieved.
If I open the file and manually, press enter at the end of every record and delete the line (effectively put a UNIX newline at the end), the awk statement gives the correct results.
What could be the reason for this? What change should I make to ensure that the file is read correctly.
Regards,
Bakul