HP3000-L Archives

April 2010, 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:
John Pitman <[log in to unmask]>
Reply To:
John Pitman <[log in to unmask]>
Date:
Thu, 22 Apr 2010 08:04:04 +1000
Content-Type:
text/plain
Parts/Attachments:
text/plain (84 lines)
Ah, Yes, what Roy said.......
I suspect you are misreading something here, due to timing issues or ? Can you get system file numbers out of each process somehow? These will be unique.
I would not be at all surprised by the first file opened by every program in the system having the same 'local' file number , but each would be private to its process, and as long they were all different files, activities on any of them should be invisible to every other process.

You did say PM though didn't you?

Any file equates in place ?

Regards,

John Pitman
-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On Behalf Of Roy Brown
Sent: Wednesday, 21 April 2010 10:58 PM
To: [log in to unmask]
Subject: Re: [HP3000-L] HP3000-L: Cobol/FOPEN/HPFOPEN "Problem"

In message <[log in to unmask]>, Brian Donaldson
<[log in to unmask]> writing at 02:51:27 in his/her local time opines:-
>Hi All:
>
>I have a little problem going on with two Cobol programs. I am sure I
>already know the answer but
>I will run it by everyone on the list in case there is a solution.
>
>Cobol program #1 (mainline) and Cobol program #2 (also a mainline)
>
>#1 program runs program #2 with the RUN command via the COMMAND  intrinsic.
>
>#1 FOPENS a file (pm file, fopens ok) and the file number returns a value
>of +0010
>
>#2 FOPEN's a different file and the returned file number is also a value of
> +0010
>
>Ouch. This isn't exactly what I had been hoping for. When control returns
>to program #1
>
>I "FCLOSE" the file opened by #1 -- the bad news is that the file opened by
> program #2 is being closed!
>
>
>Is there any way of "forcing" the file system to give me different file
>numbers so that the correct files
>
>are being closed?
>
>TIA,
>Brian Donaldson.

If program #1 launches program #2 with COMMAND, then it gets control
back immediately, and the two run concurrently, if I don't miss my
guess.

I take it program #1 has already opened its file +0010 before this?

So how do you know, unless you put a PAUSE in program #1, that program
#2 has even had time to open its file +0010?

And what does program #2 think when it has its file +0010 whipped away
from under it - can you add a test to gets its opinion?

And how about program #1 - if you CLOSE the file +0010 a second time,
does it close the file you first though of, or do something else
entirely?

So - when you close +0010 in program #1, is program #2 still running? If
not, I'd expect that it has closed it file on termination.

But if program #2 *is* still running - then how do you know that program
#1 is closing program ##2's file, and not its own?

--
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 *

CAUTION: This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify RYCO Hydraulics Pty. Ltd. immediately. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of RYCO Hydraulics Pty. Ltd.

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

ATOM RSS1 RSS2