If you want to split the whole string on “|” and need to get the result as a string list like this
To be or not to be. To win or not to loose …
012
8890623
PLM
000000000002
20031029
then you call pub.string.tokenize after your bytesToString flow. Set the delim as “|”
Thanks for the advise on using the tokenize. But there is carriage return in which determines the next record. Getting the string list, how can I insert the individual fields into the database with the respectives fields?
I’m not sure this is helpfull but… we had a similar flat file and ended up creating a flatfile schema. The end of line character was the carriage return and the field seperator was the “|”.
The flat file schema didn’t have a default record type, allowed undefined data and had two record types. One for the text and another for the delimited fields. We then used the convertToValues service to parse the data passing in the file contents as a string and the schema.
bouellet, are you using wM 6.0. Because i dont see flatfile schema under wM 4.6. i hope i can have an alternate advise on this matter. thanks. next time i think i better ask the users to provide us with XML documents to simplify things. unfortunately, their process has always been providing flatfile in this manner. thanks