This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
I am using %scan to split out individual fields from a CSV file:

EVAL      pos = %scan(sep: input : start)
sep = ','  , input is the CSV record and start pos increases as the fields
are stepped through.

 However, I got an error:  'Length or start position is out of  range for
the string operation'. Debug showed that there is a 256 byte limit on the
scan string length although the IBM ILE RPG documentation does not mention
this! I'm on v4r5 and can create character data up to 32,767 so why is the
scan restricted to the RPG3 char max of 256? A scan of 32,767 is extreme
but my input CSV record had a max of 480 which seems very reasonable.  Has
the limit been lifted for v5?

I got by this with a messy workaround of splitting the input into two and
scanning each bit separately. I rejected the QCLSCAN API which has a max
of 999 because of the call overhead.

Keith


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.