Page 1 of 1

Change of Delimiter

Posted: Wed Jan 16, 2008 6:02 am
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?

Posted: Wed Jan 16, 2008 8:34 am
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.