On Wed, Aug 14, 2013 at 6:16 PM, Luis Rodriguez <luisro58@xxxxxxxxx> wrote:
Of course, another option could be to read the stream file directly with a
RPGLE program, process the line and write it directly to your DB file with
the format you need. I recommend that, if you have the time, check out
Scott Klement's IFS routines. They are really very easy to use.
They are easy to use... for RPG. They are not as easy as scripting
languages. The very best for this kind of thing is probably Perl.
But I don't know Perl, and I don't know how easy it is to get Perl
working on the i. I do know Python, and it is very easy to get
iSeriesPython working on the i.
Seriously, for anyone doing even modest IFS work, iSeriesPython is a
dream. It's like cheating. It feels unfair how easy things are.
But before going too deep into solutions, I don't think there has been
enough information about the problem. How are the unwanted carriage
returns supposed to be handled? Just completely removed? Are there
any *wanted* carriage returns in the data? After all, Alan talks
about "records" but an IFS stream file doesn't have records, other
than what is delimited by LF or, if the data is Windows-centric, then
CRLF. If all line-endings are removed, there will just be one
We need more information to give an accurate solution.