In an HLL on Iseries (RPG or COBOL or other) is there a "best practices" method to build an I/O subroutine?

For example to read a customer record, should the i/o routine contain ONLY a read, with any positioning/accept/reject logic outside the i/o routine?

Or should the i/o routine be a black box which returns ONLY records that the program is interested in processing?

Or is either approach equally accepted?

Or a better approach?

This would be AFTER an SQL or opnqryf or LF does its own filtering of the cust file.



Also, is a priming read widely used to start sequential processing of a file, or is there a better method?

(at my current job, priming reads are avoided, but that seems to add lots of complexity and layers - but maybe its just that Im not used to it)


I know these are basic q's, but my new job is challenging stuff I thought was standard!

Thanks!


______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

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.