How to read a column with newline characters

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

How to read a column with newline characters

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Columns that contain line terminators must be quoted, if I recall correctly.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply