× 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.



You can use stream files like internally described files.  Also, some people
put a header with "record size" and other information at the beginning of a
file.  The "record size" isn't something externally defined.  You need
meta-knowledge and/or hard coding.   Binary files are often written in
"records."  Pascal and most BASICs have special I/O routines for this.


> -----Original Message-----
> From: dmosley@dancik.com [mailto:dmosley@dancik.com]
> Sent: Monday, June 03, 2002 2:40 PM
> To: rpg400-l@midrange.com
> Subject: RE: Search for SELECT / FROM parameters in a CGI source from
> RPG
>
>
>
> "This is the preferred way for reading binary files, in a big
> chunk at a
> time, usually the record size."
>
> How do you know "Record Size"?
>
>
> David L. Mosley, Jr.
> Systems Analyst
> 2000 CentreGreen Way
> Suite 250
> Cary, NC 27513
>
>
>
>                     Jim Langston
>                     <jlangston@celsin        To:
> "'rpg400-l@midrange.com'" <rpg400-l@midrange.com>
>                     c.com>                   cc:
>                     Sent by:                 Subject:     RE:
> Search for SELECT / FROM parameters in a CGI source from
>                     rpg400-l-admin@mi        RPG
>                     drange.com
>
>
>                     04/03/02 05:07 PM
>                     Please respond to
>                     rpg400-l
>
>
>
>
>
>
> Yes, the read would grab the next block of 1024 or however
> many bytes are
> left til it reaches the end.
>
> Just like an DB2 read reads the next record.
>
> This is the preferred way for reading binary files, in a big
> chunk at a
> time, usually the record size.  Usually doesn't work too well for text
> files
> though.
>
> Regards,
>
> Jim Langston
>
> -----Original Message-----
> From: dmosley@dancik.com [mailto:dmosley@dancik.com]
>
> Would you have this in a Do-Loop, to read each 1024 blocks of data?
> Say something like...
>
> C                DOU          Whatever
> C                EVAL      CHARSREAD     = read(fp:
> %addr(input): 1024)
> C                   IF        CHARSREAD    <=  0
> C                   LEAVE
> C                   ENDIF
> C                ENDDO
>
> Would this be accurate?  Will the read() know to pull the
> next 1024 each
> time?
> _______________________________________________
> 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.
>
>
>
>
> _______________________________________________
> 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 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.