🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.tpu
Article #52

RE: Getting a logical within a TPU procedure

#52
From: fairfield
Date: Wed, 12 Aug 1992 18:59
45 lines
2628 bytes
I wrote:
>>!+
>>!  SYS$TRNLNM is case-sensitive, apparently, so make a local uppercased
>>!  version of INSTR.
>>!-
> ...
>>        ISS = SYS$TRNLNM (,'LNM$FILE_DEV',LOCAL(1:LLCL),,ITMLST)

Paul Neubauer reponded:
>                                                              ...there
> is a simple option that causes the logical name match to be case
> blind:
> 
>         ISS = SYS$TRNLNM (LNM$M_CASE_BLIND,'LNM$FILE_DEV',LOCAL(1:LLCL),,ITMLST)

    Paul is 100% correct, thanks for straightening this out (chagrin...
chagrin...chagrin).  That's what I get for not walking down two corridors 
to take a look at the System Services Reference Manual before posting :-(
(And I don't have BOOKREADER access under VWS from my poor old VS2000...)

> You may have to %INCLUDE some additional system file (I don't use
> FORTRAN often enough to remember which file contains which constant
> (LNM$M_CASE_BLIND)), but that should not be difficult to find out.

    The source I posted already has INCLUDE '($LNMDEF)' which picks up
the $LNMDEF parameter definitions from SYS$LIBRARY:FORSYSDEF.TLB, so 
Paul's suggested change, above, will work as given and the CALL STR$UPCASE
can be eliminated.  In fact, all reference to LOCAL, LLCL, and the STR$xxxx
routines could be removed and the $TRNLNM call replaced with:

    ISS = SYS$TRNLNM (LNM$M_CASE_BLIND, 'LNM$FILE_DEV', INSTR,, ITMLST)

In that case, one needs to be ure there are no leading nor trailing blanks
in the 2nd argument to CALL_USER, i.e., the INSTR argument to TPU$CALLUSER,
or the translation will fail.  Alternatively, one could retain LOCAL and
the STR$TRIM call in TPU$CALLUSER, and additionally check for leading blanks,
to buffer the user from such details...

		Cheers, Ken
-- 
 Dr. Kenneth H. Fairfield    |  Internet: Fairfield@Slacvx.Slac.Stanford.Edu
 SLAC, P.O.Box 4349, MS 98   |  DECnet:   45537::FAIRFIELD (45537=SLACVX)
 Stanford, CA   94309        |  BITNET    Fairfield@Slacvx
 ----------------------------------------------------------------------------
 These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
Technical Details
Message-ID: <1992Aug12.105942.1@slacvx.slac.stanford.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!unixhub!slacvx.slac.stanford.edu!fairfield
References: <9208111415.AA14508@depot.cis.ksu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!unixhub!slacvx.slac.stanford.edu!fairfield
From: fairfield@slacvx.slac.stanford.edu
Newsgroups: vmsnet.tpu
Subject: RE: Getting a logical within a TPU procedure
Message-ID: <1992Aug12.105942.1@slacvx.slac.stanford.edu>
Date: 12 Aug 92 18:59:42 GMT
References: <9208111415.AA14508@depot.cis.ksu.edu>
Sender: news@unixhub.SLAC.Stanford.EDU
Organization: Stanford Linear Accelerator Center
Lines: 45
Nntp-Posting-Host: slacvx.slac.stanford.edu