HP3000-L Archives

October 2009, Week 2

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:
Roy Brown <[log in to unmask]>
Reply To:
Roy Brown <[log in to unmask]>
Date:
Fri, 9 Oct 2009 07:58:58 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (64 lines)
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 *

ATOM RSS1 RSS2