Page 1 of 1

How to read a column with newline characters

Posted: Mon Jun 14, 2010 4:45 am
by prasad_chennai
Hi All,

I have a requirement where in I am getting data in a pipe delimited file which is having data with newline characters in it. Below is the sample content of the data:-

060707394|CUSC|08-JUN-10|77620138|0|11-JUN-10|SOCIAL SECURITY ADMINISTRATION|08-JUN-10|08-JUN-10|10-JUN-10|||/HCGS/520317 /MB /|DHEC545700 ATI|000000124791812:000000103431694|||ATT NOC|Log from AOTS Ticket: 000000124791812
Phillip /SS NOC called in for status. BMP ticket is still in queue for testing.
Requested 1st level escalation with the BMP center. Also provided my name for first level escalation to Phillip /SS NOC
.
Updated ticket owner||1753024|545700|AT&T Service ID|T1.5||ERR

Data between 18 to 19 is the one column which contains the data which contains mail content and with multiple new line characters.

In my datastage job while reading from the sequential file I have kept the contains terminatiors to yes for all the columns except for the last column where I have marked it as No and for Incomplete columns I have kept the option to replace. But still when I do this out of my data 20% of them is dropped of.

Could anyone please help me how to handle the data for this one particular column.

Thanking in advance.
Prasad

Posted: Mon Jun 14, 2010 5:54 am
by chulett
Usually, setting 'Contains Terminators' to Yes is all that is needed. What is different / unique to the 20% that are still causing you problems? Where exactly are these being 'dropped off' - does the stage not read them, your source reject them, something else entirely? Any warnings associated with this behavior?

Posted: Mon Jun 14, 2010 5:34 pm
by ray.wurlod
Columns that contain line terminators must be quoted, if I recall correctly.