Page 1 of 1

How to read a file having record delmiter as blank line

Posted: Thu Mar 10, 2011 11:04 pm
by bgs_vb
Hi ,
I am getting input data as follow in a sequential file:

a: test us,osjkjkj
b: ab
c: defhj

a: tes1t usa,osjkjkj
b: cd

a: tt usa,osjkjkj
b: ef
c: ghij
d: defhj

Required output format is :

a|b|c|d
test us,osjkjkj|ab|defhj|NULL
tes1t usa,osjkjkj|cd|NULL|NULL
tt usa,osjkjkj| ef|ghij| defhj

Note: a,b,c,d are column names

I am not sure how to achieve this result . Please advise which stage i can use to achieve this in datastage .

Re: How to read a file having record delmiter as blank line

Posted: Fri Mar 11, 2011 1:53 am
by swarnkar
You can pass your source file through a simple script where you can replace enter character with comma or some other delimiter and then
blank lines with enter chacter and change.

Thanks,
Nitin Swarnkar

Posted: Fri Mar 11, 2011 2:39 am
by ray.wurlod
Search DSXchange for "vertical pivot", for this is what you are trying to accomplish.