David,

Surely you can just do that. The problem is that indicator 10 (if on)
tells you the open did not succeed. It does not tell you why (file already
open? file does not exist? level check?), nor does it tell you whether
MYFILE is open or not. Your original question was:

How do I write the equivalent of
/FREE
IF NOT %OPEN(MYFILE);
%OPEN(MYFILE);
ENDIF;
/END-FREE
for RPGIII ?

Darren supplied you with an example of a file information structure where
you can find that information.

Joep Beckeringh


David FOXWELL

Guys, guys, lets be reasonable here. Surely we're not the only shop
with a load of RPGIII that still need to be maintained. I only ever
used CVTRPGSRC once and it left me with hours of work to get the
program running correctly.

What noone has replied to is, why can't I just do this?

C OPEN MYFILE 10
C KEY CHAINMYFILE 10

Isn't it like
monitor;
open myfile;
on-error;
// do nothing
endmon;

??

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.