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
Regarding Delimiters
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 106
- Joined: Thu Jul 27, 2006 10:05 pm
- Location: Mumbai
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.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.