Regarding Delimiters

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
boppanakrishna
Participant
Posts: 106
Joined: Thu Jul 27, 2006 10:05 pm
Location: Mumbai

Regarding Delimiters

Post by boppanakrishna »

hi all,
How to use more than one delimiter in a sequential file like ",/,~ etc..

The actual pbm is My source file contains more than one delimiter and is it possible in datastage to handle all the delimiters ...

ex: asd,juk~,jki/hsju;

i want to handle each delimiter ?
is it possible?

Thanks in Advance
Boppana Ramakrishna
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The sequential file stage only supports one delimeter character per file. If you have several characters then the best way is to read the whole record as one long column and change the different delimiters into a single one, write this to another sequential file and then read that file with the correct column definitions. I usually specify this secondary temporary file to be a named pipe for performance purposes.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's no need to involve the intermediate file(s) mentioned by Arnd; you still need to use a Transformer stage to parse the individual lines.

Alternatively you could use a filter command such as sed or awk or tr to translate the delimiter characters prior to the lines being processed by DataStage. On Windows you would need to obtain these commands from a UNIX emulator such as MKS Toolkit, CygWin, etc.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply