Issue while reading sequential file
Posted: Fri Mar 02, 2018 3:01 am
Hi,
This is very common error but I did not get any suitable answer from other entries so posting this as new query.
I am trying to read csv file which has record delimiter as '\r\n'. It is windows file. I can see <CR><LF> in editors after each record.
Schema File has been defined as below:
record
{delim_string=',',charset='ASCII',final_delim=end,record_delim_string='\r\n',quote='"',null_field=''} (
Col1: string[max=20];
Col2:nullable string[max=1000];
Col3:nullable string[max=1000];
Col4:nullable string[max=1000];
)
DataStage job gives below warning and all the records in the file goes to reject.
Sequential_File_0,0: Input buffer overrun at field "Col3"
Sequential_File_0,0: Import unsuccessful at record 0.
But when I change the record_delim_string='\n' in schema file, then file processed successfully and I get all records in output.
Since this is windows file and have record delimiter as \r\n, so it should work when I define record_delim_string as '\r\n'.
Please help. Thanks.
This is very common error but I did not get any suitable answer from other entries so posting this as new query.
I am trying to read csv file which has record delimiter as '\r\n'. It is windows file. I can see <CR><LF> in editors after each record.
Schema File has been defined as below:
record
{delim_string=',',charset='ASCII',final_delim=end,record_delim_string='\r\n',quote='"',null_field=''} (
Col1: string[max=20];
Col2:nullable string[max=1000];
Col3:nullable string[max=1000];
Col4:nullable string[max=1000];
)
DataStage job gives below warning and all the records in the file goes to reject.
Sequential_File_0,0: Input buffer overrun at field "Col3"
Sequential_File_0,0: Import unsuccessful at record 0.
But when I change the record_delim_string='\n' in schema file, then file processed successfully and I get all records in output.
Since this is windows file and have record delimiter as \r\n, so it should work when I define record_delim_string as '\r\n'.
Please help. Thanks.