In message <[log in to unmask]>, Brian
Donaldson <[log in to unmask]> writing at 18:51:08 in his/her local time
opines:-
>>Does the KSAMXL file close *as well*, or is it *just* the FFF that
>>closes?
You missed my first question here.
But I think I know the answer now, and Steve Cooper's nailed it.
When you do those FCLOSE zeroes, it isn't doing what you intend. It's
closing something you (and MPE, probably) don't want closed.
Possibly not even the FFF; while it *could* be, under certain
circumstances, it's probably STDIN or STDOUT, or something else that
fubars your program's ability to keep running, and only looks to you
like it's the FFF got closed.
Bottom line: you can't FCLOSE a file by name, only by number; and you
don't get the number until you've opened it.
So take out any of those FCLOSEs where you don't yet have a file number
to supply it, and all should be well.
Or at least, you should be able to get into the next round of debugging
:-)
Regards
Roy
<snip>
>FCLOSE WS-TEAMS-FILE-NUM=>+0000<
Aaargh! There's your problem, right there.
>FOPEN WS-TEAMS-FILE-NUM=>+0018<
>Before each call to FOPEN I do a call to FCLOSE of the same file to ensure
>it is closed before I open/re-open it.
Ah. But before the first ever FOPEN of a file, you don't have a file
number to FCLOSE it with. So you need to restrict such FCLOSEs to files
you know you currently have open.
>I will have to do some further research into these fopen/fclose calls
>and I will get back to you.
<snip>
Best regards
Roy
--
Roy Brown 'Have nothing in your houses that you do not know to be
Kelmscott Ltd useful, or believe to be beautiful' William Morris
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|