Page 1 of 1

How to handle multi delimiter (flat file) in DataStage ?

Posted: Wed Sep 19, 2007 7:45 am
by swades
Hello,
I am getting multi delimiter separated flat file.
Delimiter is : <|>
Can anyone have idea how to handle these type of file ?

Thanks in advance for your time.

Posted: Wed Sep 19, 2007 8:09 am
by chulett
Typically that would involve some kind of O/S level preprocessing step to change those characters into a more 'traditional' delimiter the stage could then handle. Or read the record in as one long string and then use custom logic to parse the fields out inside the job.

Posted: Wed Sep 19, 2007 4:50 pm
by VCInDSX
Hi,
I vaguely recall our instructor pointing a format specification for "Delimiter string" in the Sequential File Stage properties..... I checked it out now and looks like there is no luck with Server Jobs.
This property is available only in Parallel Canvas :( :(

Thanks

Posted: Wed Sep 19, 2007 5:38 pm
by jhmckeever
You could pass your file via a 'Filter Command' to translate the multi-character delimiters into something you'd prefer. Remember to check the box on the Stage/General tab to enable Filter Commands.

Posted: Wed Sep 19, 2007 5:58 pm
by chulett
True, the 'O/S level' step I mentioned could be leveraged in the Filter option of the Sequential File stage... say, something like 'tr' or 'awk'. My personal preference would be to do it as a separate step, for whatever that is worth.