Page 1 of 1

Sequential File CSV File format

Posted: Fri May 02, 2014 2:26 am
by imfarhan
Hi All ,

Some of the rows from my Sequential file (csv) are rejecting. The reason CR/LF within the field.

Do you think I can handle this problem by setting up the right properties/format parameter on Format|Record_level.

If it LineFeed (LF) I could handle them by using

Code: Select all

Properies|format (Record delimeterstring = DOS Format) 
But within a line are two CR/LF(CariageReturn/LineFeed).
However, each column/field are double quotes and field delimiter within comma i.e. "aaa","bbbb"

From the following example the 1st row ok but (2,2b) rejecting during load
When I open the file in Notepad++ it show two CR/LF(CarriageReturn/LineFeed) on row 2,2b as shown below:

Code: Select all

"106.5","18.1","15.96","Logmar",,"No",,"Yes",,"Farhan" 
"110.3","21","17.26","Logmar
Refer to Optician.",,"No",,"Farhan"    

Code: Select all

1--> "106.5","18.1","15.96","Logmar",,"No",,"Yes",,"Farhan" CR|LF
2--> "110.3","21","17.26","Logmar   CR|LF
2b-> Refer to Optician.",,"No",,"Farhan"    CR|LF
Note: From above Example : CR|LF is not the value its show the row qualifier (CarriageReturn/Line Feed
From the above example (2) and (2b) rows should be one row like (1)

The properites I tried on Format tab for "RecordLevel" are:

Code: Select all

Final delimeter = null
Record delimeter = UNIX newline
or

Code: Select all

Final delimeter String "Farhan"
hope make sense appreciate your help in advance
Kind regards,
Farhan

Posted: Fri May 02, 2014 5:02 am
by imfarhan
so looking the data can build the logic as last column values can pass on "Record_Delimeter_String" = \" \r \ n

Code: Select all

Record Delimiter String = \" \r \n
Final Delimiter = end
Does not work

When I use folllowing condition

Code: Select all

Record Delimiter String = \r \n
Final Delimiter = end
It view only row 1 not the 2nd row which I would like to view as well

:cry:

Posted: Fri May 02, 2014 7:39 am
by qt_ky
Try using the sequential file stage line terminator setting in a server job.

Posted: Fri May 02, 2014 10:00 am
by chulett
It is more forgiving of things like that when configured properly. A Server Shared Container in your PX job could be leveraged as well to run just that stage.

Source Data Rejecting coz of Data row keep CR/L

Posted: Mon May 19, 2014 5:24 am
by imfarhan
Hi Eric,

Sorry for late reply Thanks Eric for your response.
I've tried on Server job by creating a row keep CR/LF middle of the column/field and I think it was working

However, I've requested to Data provider to correct from their end, so I don't need to handle it at my side.

I'm sure there must be a way to handle this exception on Parallel job?
Thanks again for your help.
Kind regards
F

Posted: Mon May 19, 2014 7:43 am
by qt_ky
As Craig menioned above, a Server Shared Container can be used within your parallel job. It may be a good idea to use that method to continue to check for the situation whether or not the data provider agrees.