mutliple line data into single line

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
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

mutliple line data into single line

Post by sravanthi »

Hi,

I have a job db2...>trns...>seqential file.I'm extracting data and populating into a file.Source has 2 rows but when populated into file the file count is 10.

I have used
CONVERT(char(010),char(032),trim(fieldname)) in transformer to replace new line with space..but it is not working....

data is like this :

Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3
Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3

repeated lines.

It is a longvarchar(1500) field.I should get the data in single line instead of multiple lines.Please advise....

Thanks in advance
sravanthi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are you sure that the delimiter character is Char(10)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

Post by sravanthi »

Ray,

I'm not sure of what delimiter it is .I have tried by looking at the data.

Is there any way to figure it out....sorry for this kind of question ...
sravanthi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Dump the data to a text file, and there examine it with a hex editor such as UltraEdit.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

Post by sravanthi »

ray.wurlod wrote:Dump the data to a text file, and there examine it with a hex editor such as UltraEdit. ...
Ray,

I have used ultaedit and when checked view line endings it was displaying at the end

Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3
Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3 Build 1 dx add 3

Please advice.

Thanks!
sravanthi
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

Post by sravanthi »

Ray,

I have modified my code to CONVERT(char(012),char(032),trim(field name)) instead of CONVERT(char(010),char(032),trim(field name))

And now it is displaying in a single row.

Thanks!
sravanthi
Post Reply