× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Scott,
Thanks for the tip. I've used CPYFRMSTMF before but that does not handle
delimiters. Although, in this case, I need to process some fields before
loading to PF and prefer to do this in the same program.

Keith


>Keith,

>I don't know about the %scan limitation but wanted you to know there is a
>command CPYFRMIMPF that will read a .csv file and populate the fields in
a
>database file.  I have found it a lot easier than trying to do it myself
>anymore.
>
>Scott Mildenberger
>
> -----Original Message-----
> From: keith_mccully@wunderman.co.uk
> [mailto:keith_mccully@wunderman.co.uk]
> Sent: Wednesday, November 13, 2002 7:05 AM
> To: RPG400-L@midrange.com
> Subject: %scan out of range error
>
>
> 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.
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.