Page 1 of 1

Delimitted and Fixed Width in Single File??

Posted: Fri Apr 25, 2008 12:27 am
by senthilt1
Hi Friends,

In Data Stage , is it possible that a single file can be defined as both Delimitted and Fixed width at a time. Or is there any other options available to do this? In my case, first few columns have delimiter and rest of the columns are fixed width.

Please guide me.

Thanks,

Senthil P

Posted: Fri Apr 25, 2008 1:06 am
by keshav0307
you can't define the a sequential file to be fixed width and delimited both.

you can read whole record as a single coulmn
and then in trasformer you can check for each record is delimited or fixed, and then based on that fetch values in different columns

Posted: Fri Apr 25, 2008 2:08 am
by OddJob
You could try...

In the sequential file stage define columns, one each for the delimited columns, plus one extra that will contain the fixed width part. The fixed width part will be the last column of the delimited cols, you can define as VarBinary, of the number of bytes you're expecting.

Then use a Column Import stage to convert the fixed width column into its constituent parts, applying the meta data as required.

Hope this helps!

Posted: Fri Apr 25, 2008 3:51 am
by senthilt1
Hi Keshav/Oddjob,

Thanks for you input.

I dint try that yet, would let you once am done with it.

Senthil P