|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] He said CPYFRMIMPF not CPYFRMSTMF. CPYFRMIMPF -does- support delimiters. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin keith_mccully@wunderman.co.uk Sent by: rpg400-l-admin@midrange.com 11/13/2002 09:44 AM Please respond to rpg400-l To: rpg400-l@midrange.com cc: Fax to: Subject: RE: %scan out of range error 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. > _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.