Change of Delimiter

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
kunal1101
Participant
Posts: 8
Joined: Mon Dec 03, 2007 11:50 pm
Location: Pune

Change of Delimiter

Post by kunal1101 »

Hi everyone....I am comparitively new to DSTX.
My doubt is,how can i change the input delimiter of data in output file?
for ex:-
if my data is:-
ABCWIDGET~A123~ABC Widgets (Delimiter ~)

and i want ouput data as:-
ABCWIDGET A123 ABC Widgets (Delimiter space)

how can i achieve this using single type tree?
Kunal_devil!!!
jvmerc
Participant
Posts: 94
Joined: Tue Dec 02, 2003 12:57 pm

Post by jvmerc »

Several ways to handle this....

One is to copy your output record so you have record_in and record_out. Then file_in, file_out. Change the second records delimiter. Both records share the same elements with dif delimiters. The problem here is that if you change one record (add/remove element) you need to change both records.

Another way depends on your input data. If your first element is a fixed length you can define a variable delimiter.

Of course if all you want to do is change the delimiter you could define your records as text_blobs and substitute '~' with '<SP>'.

I'm sure there are other ways as well.
Post Reply