Page 1 of 1

Incorrect allignment while generating CSV file using DS job.

Posted: Fri Jul 05, 2013 12:59 am
by ramakrishna459
Hi all,

we are getting incorrect allignment for the few rows in csv file when generating using sequential file.

Format settings are delimeter as comma, quotes as double.

77° - 9° 10",R0403"
77° - 9° 10",R0403"
77° - 9° 10",R0403"
77° - 9° 10",R0403"
77° - 9° 10",R0403"
77° - 9° 10",R0403"
77° - 9° 10",R0403"

the above two columns are comming in single column instead of two columns.

Posted: Fri Jul 05, 2013 1:55 am
by crystal_pup
It appears that there are special characters in the data that is being written to the target sequential file. Can you try removing the columns ( the ones that have special characters "°") and re-run the job and verify if the issue still persists. If the issue disappears, then you might have to somehow take care of the special characters and reintroduce the dropped columns in the target sequential file.

Note - I have assumed that your target is a sequential file stage.

Posted: Fri Jul 05, 2013 2:52 am
by ray.wurlod
What should you be getting, and what format settings are you using?

Posted: Fri Jul 05, 2013 5:21 am
by ramakrishna459
ray.wurlod wrote:What should you be getting, and what format settings are you using? ...
Actualy 77° - 9° 10 should come in seperate column and R0403 should come in another column.
Am using sequential file format settings for varchar columns using quote as double and delimeter as comma.

is there any way to change the settingsin sequential file to fix this issue.

Posted: Fri Jul 05, 2013 6:34 am
by prasson_ibm
Your file is probably not in a correct format.

According to your definition given in sequential file (Delimiter=Comma and Quote=Double) your result should go to same column.

Your correct format is :-

Code: Select all

"77° - 9° 10","R0403" 
Remove quote=double and see what is your result.

Posted: Fri Jul 05, 2013 10:39 am
by chulett
Or read it as a single field, strip out the double quotes and then let a Column Export stage create the two fields.

Posted: Fri Jul 05, 2013 3:37 pm
by ray.wurlod
Each field is missing its opening quote. Have a severe talk with the data provider.

Posted: Wed Jul 10, 2013 3:32 am
by srinivas.nettalam
As Ray suggested first step is to talk to the data provider if that is possible
OR
Read as a single column ,pass that to a stage variable, strip out the " from the stage variable and use field function on the stage variable in the derivation for columns.