Question:
Hi there,
I have a flat file which consists of many lines. Now I want to loop over every line to add an unique ID in the beginning of every line, using concatenate-service or something.
So I am looking for the services how to transform the file into a Stringlist.
There is no service like: StringToStringList, so what do I do, please ?
Thanx a lot,
Peter.
Answer:
After obtaining the flat file using GET to *content, do a BytesTo String (with *content as input) to *value. You can then Concat your prefix (instring1 and the *value (instring2) to a new string (value). Then you can write your new string back to the flat file using openFileWriter, WriteFileWriter etc
Answer:
Hi,
Thank you for fast answer. But I want a prefix for every single line in the original file. So like an IDoc flatfile where I want a prefix for every segment-name.
I think the way you desribed is setting a prefix for the first line only.
The prefixes I want to add can differ per line.
Thanx, Peter.
Answer:
I think I can use pub.string.tokenize, with an empty 'delim'-parameter.