|
Thanks everyone! It was the %trim. The record length can change so I can't read 119 bytes at a time so I read 1024 bytes at a time and move it to a 2048 byte buffer. I then traverse the buffer until I find no more crlf. To move the remaining data to the beginning of the buffer before moving the next 1024 bytes, I changed my code to do this: eval data = %subst(data:offset:1024-offset+1) %subst(dataRead:1:bytesRead) That's why I didn't see the %trim as a problem - I processed seven "records" before I got the error! Again, thanks very much! Phil __________________________________________________ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/ +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.