Read multiple lines in single record

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
UAUITSBI
Premium Member
Premium Member
Posts: 117
Joined: Thu Aug 13, 2009 3:31 pm
Location: University of Arizona

Read multiple lines in single record

Post by UAUITSBI »

Hello,

I am reading a field "COMMENTS" Varchar(1000) from a comma delimited file along with 4 other columns through a sequential file stage, while importing the data I am not able to read all the rows because few rows have the data like below:
"2013 - 2014
Maths
Reading

2014 - 2015
Maths
Reading "

Following are the properties I am setting in the stage:

Record Level:
Final Delimiter = None

Field Defaults:
Delimiter = comma
Null Field Value = ''
Quote = Double

Because of the carriage return (newline) records like above are dropping. I need to import the data in the same format as above, is there a way that this can be done through sequential file stage ?

I have researched on "Intact" property in the stage but looks like I will be able to use partial schema only for a particular column and will not be able to pass rest of the columns.

Any help is very much appreciated !!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a server Sequential File stage, either in a server job or in a server Shared Container in your parallel job.

Server Sequential File stage can be configured to handle values that contain line terminators. Scroll right in the Columns grid to find this property.

Parallel Sequential File stage cannot be configured to handle values that contain line terminators.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
UAUITSBI
Premium Member
Premium Member
Posts: 117
Joined: Thu Aug 13, 2009 3:31 pm
Location: University of Arizona

Post by UAUITSBI »

Bingo !!! Thanks for the help Ray, I have created server shared container as suggested with Sequential file stage and I am able to load comments field as desired. I hope we will get this feature in Parallel Sequential stage in future.

Kudos !!
Post Reply