×
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.
?
Well, just my two cents, but I would definitely use the fopen(), fclose(), fread(), and fwrite() functions.
It is really well debugged. :)
Given that, you can probably write something that is a little faster, but that usually works out to be more trouble than it is worth in these cases.
-Paul
-----Original Message-----
From: Adam Glauser [mailto:adamglauser@xxxxxxxxx]
Sent: Wednesday, February 4, 2009 02:44 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Buffered reading of stream files
I have a routine which reads a stream file byte by byte looking for record start and end delimiters. I have implemented my own buffering. Now I'm looking at trying to separate the buffered reading from the actual parsing so that I can handle records without start delimiters, as well as delimiters of arbitrary length.It should be relatively easy to modify my current buffering code to work with different delimiters, but I wonder if I'd be better off just using the _C_IFS_(fopen,fclose,fread) functions.What would you choose and why?-- This is the RPG programming on the IBM i / System i (RPG400-L) mailing listTo post a message email: RPG400-L@xxxxxxxxxxxxxx subscribe, unsubscribe, or change list options,visit:
http://lists.midrange.com/mailman/listinfo/rpg400-lor email: RPG400-L-request@xxxxxxxxxxxxxxxxxx posting, please take a moment to review the archivesat
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.