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.
How to handle multi delimiter (flat file) in DataStage ?
Moderators: chulett, rschirm, roy
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
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 301
- Joined: Thu Jul 14, 2005 10:27 am
- Location: Melbourne, Australia
- Contact:
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>
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>
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
"You can never have too many knives" -- Logan Nine Fingers