Delimitted and Fixed Width in Single File??

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
senthilt1
Participant
Posts: 134
Joined: Mon Nov 19, 2007 2:17 am

Delimitted and Fixed Width in Single File??

Post 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
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post 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
OddJob
Participant
Posts: 163
Joined: Tue Feb 28, 2006 5:00 am
Location: Sheffield, UK

Post 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!
senthilt1
Participant
Posts: 134
Joined: Mon Nov 19, 2007 2:17 am

Post by senthilt1 »

Hi Keshav/Oddjob,

Thanks for you input.

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

Senthil P
Post Reply