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



Best avoided anyhow. Performing a full-Open for every row processed is expensive. Note that the CPYF into a open-only-once work file [as suggested in another message] would open the FROMFILE() *and* TOFILE() each time, so that is even more expensive; I do not believe either source nor target opens done by CPYF can utilize a shared open.

As with many other of these questions about how to do some particular file\I/O in CL, the best resolution is to not use CL to do what other HLLs are good at doing. That is, if CHAIN is desirable, then use RPG. Bruce's CLF is effectively enabling the CL to have a similar interface as RPG CHAIN, using the C file\record interface.

Regards, Chuck

On 30 May 2012 14:21, Stone, Joel wrote:
Thanks for the CLOSE idea, but we are on v5r4.

Anderson, Kurt on Wednesday, May 30, 2012 3:14 PM wrote:
Sorry, it's not CLOF, it's actually CLOSE.

"The Close Database File (CLOSE) command will explicitly close a
database file that was implicitly opened by a Receive File (RCVF)
command run within the same CL program or ILE CL procedure. A file
with the same open identifier must have been declared by a Declare
File (DCLF) command within the same CL program or ILE CL
procedure.

After the CLOSE command is run, the next RCVF command for this file
will implicitly reopen the file and read a record from the file.

You can use CLOSE for a database file that is already closed or was
never opened; no error message will be sent."

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.