HP3000-L Archives

February 2004, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Walter Murray <[log in to unmask]>
Reply To:
Walter Murray <[log in to unmask]>
Date:
Wed, 18 Feb 2004 23:48:51 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
 "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 *

ATOM RSS1 RSS2