HP3000-L Archives

July 1995, Week 4

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:
Bruce Toback <[log in to unmask]>
Reply To:
Bruce Toback <[log in to unmask]>
Date:
Thu, 27 Jul 1995 07:37:34 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
I wrote:
>>Hi all,
>>Is there any way for a user process to get the actual name of an open
>>data base? I'm looking for the fully-qualified MPE filename of the root
>>file that was actually opened.
 
To which Paul Christidis responded:
 
>1.      getprivmode;   <<root file's file code is -400>>
>        fnumber := fopen (DBname,1,,,,,,,,,,,-400);
>            ...fgetinfo (fnumber,MPE'file'name);
>        getusermode;
>
 
Based on Paul's suggestion, I tried this using FLABELINFO instead of
FOPEN/FGETINFO. It works without priv mode and doesn't have the remote
possibility of deleting the data base that Paul mentioned. It also works if
the data base is opened in exclusive mode. Unlike Paul's method, though, it
does not work for a remote data base. This happens to be fine in the
application I'm working with.
 
Thanks!
-- Bruce
 
---------------------------------------------------------------------------
Bruce Toback    Tel: (602) 996-8601    | G is for Garbage. He whose sin
OPT, Inc.            (800) 858-4507    | It was to put such input in
11801 N. Tatum Blvd. Ste. 142          | By rule must stand beneath the spout
Phoenix AZ 85028                       | When his output's coming out.
[log in to unmask]                     |        -- The Programmer's ABCs

ATOM RSS1 RSS2