[comp.os.vms] Opening files w/EXEC mode logicals

GA.JPH@ISUMVS.BITNET ("John Hascall") (09/14/87)

   ASIDONHO%JHUIGF.BITNET@WISCVM.WISC.EDU writes:

>      I have written a useropen routine to open files only using <=exec mode
> log names (by changing the lnm_mode field in the FAB as described in 5-19
> of the RMS manual). The program works OK for lnm_mode=psl$c_super, that is,
> it will ignore user mode names for the open. It fails for lnm_mode=psl$c_exec
> however (just doesn't see that exec mode name), unless the exec name is
> in the SYSTEM TABLE! Since sys$output and sys$input are process
> specific, it seems I am hosed again. I could be turning on and off the
> priv, but that seems more error prone and less elegant for what I am
> trying to do, not to mention a hassle to add to each program requiring it.

The reason why only logical names in the SYSTEM TABLE are used is that
RMS looks for logical names in the logical name table LNM$FILE_DEV, but
LNM$FILE_DEV is it self a logical name.  In fact it is a logical name
with TWO equivalence lists.
Try the command "SHOW LOGICAL/FULL/TABLE=LNM$SYSTEM_DIRECTORY"

and you will probably see something very much like:

(LNM$SYSTEM_DIRECTORY)    [kernel]  [shareable,directory]
            [Protection=(RWE,RWE,R,R)]  [Owner=[SYSTEM]]

          .
          .
          .
  "LNM$FILE_DEV" [super] = "LNM$PROCESS"
     = "LNM$JOB"
     = "LNM$GROUP"
     = "LNM$SYSTEM"
  "LNM$FILE_DEV" [exec] = "LNM$SYSTEM"
          .
          .
          .

Hope this is somewhat enlightening....

   Also, SYS$DISK is another logical name which is set up in this manner,
and has tripped-up people before.

John Hascall
Iowa State University Computation Center
GAJPH@ISUMVS.BITNET  (preferred)
GAJPH@ISUVAX.BITNET  (not all that reliable)