"Tracy Pierce" wrote:
> I feel your pain.  I believe it's the MPE File System (or would it be some
> process manager?) that takes care of closing your run unit's open files.
I
> seem to remember demonstrating that Cobol's not doing it (try calling a
> cobol subpgm from <any> and note that your files are still open after
> cobol's long gone), but once again that might in my case be a concocted
> memory.  Anyway, without that luxury, you'd better close your files!

From what I recall of the internals, COBOL keeps track of what files are
open and explicitly calls FCLOSE for them when your run unit terminates
normally (as with a STOP RUN).

In a mixed-language environment (e.g., a Pascal main calling a COBOL
subprogram), all bets are off.

Regardless of the language, of course, when a process terminates, MPE takes
care of cleaning things up, including any files that were left open.

Where you really get in trouble is with C, which, by default, does it own
buffering.  If a C/iX program terminates abnormally, there's nobody to know
about the buffers that need to be flushed.

Walter

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *