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

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
swades
Premium Member
Premium Member
Posts: 323
Joined: Mon Dec 04, 2006 11:52 pm

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

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
VCInDSX
Premium Member
Premium Member
Posts: 223
Joined: Fri Apr 13, 2007 10:02 am
Location: US

Post 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
-V
jhmckeever
Premium Member
Premium Member
Posts: 301
Joined: Thu Jul 14, 2005 10:27 am
Location: Melbourne, Australia
Contact:

Post 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.
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply