🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.tpu
Article #36

Re^2: Getting a logical within a TPU procedure

#36
From: fairfield
Date: Tue, 11 Aug 1992 04:08
35 lines
2308 bytes
In article <1992Aug10.170858.25498@news.cs.brandeis.edu>, gorokhovsky@binah.cc.brandeis.edu writes:
> I need to get a logical from within a TPU procedure. Is there a way to do it
> other than using FILE_PARSE (which uppercases the value it gets)?  Any
> suggetsions will be appreciated.  I will summarize to the net whatever replies
> I get.

    In my previous followup which included a sample TPU$CALLUSER routine
to invoke the $TRNLNM system service, I neglected mentioning the last
step: how to _use_ the TPU$CALLUSER from within EVE!  I expect that Vadim
and other knowledgable readers already know, but for the non-experts I'd
like to complete the picture.

    You invoke the procedure via the call_user TPU built-in.  call_user
takes 2 arguments, an integer "code" and a string, and it returns a 
string as the function result.  Thus you might do the following within
an EVE procedure:

		lognam := 'SYS$SYSDEVICE';
		devnam := call_user(0,lognam);

etc.  To just play with this top try it out, hit the DO key and type:

	Command: tpu message(call_user(0,'sys$login'))

for example, to get the translation of sys$login written to the message
window.  While the above case could be handled by file_parse, I've also
exercised this procedure with test cases and it does, indeed, preserve
mixed-case logical names, e.g., $ DEFINE X$MIXED "A Mixed Case string",
and ones that don't parse as filenames...
-- 
 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: <1992Aug10.200835.1@slacvx.slac.stanford.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!wupost!uwm.edu!linac!unixhub!slacvx.slac.stanford.edu!fairfield
References: <1992Aug10.170858.25498@news.cs.brandeis.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!wupost!uwm.edu!linac!unixhub!slacvx.slac.stanford.edu!fairfield
From: fairfield@slacvx.slac.stanford.edu
Newsgroups: vmsnet.tpu
Subject: Re^2: Getting a logical within a TPU procedure
Message-ID: <1992Aug10.200835.1@slacvx.slac.stanford.edu>
Date: 11 Aug 92 04:08:35 GMT
References: <1992Aug10.170858.25498@news.cs.brandeis.edu>
Sender: news@unixhub.SLAC.Stanford.EDU
Organization: Stanford Linear Accelerator Center
Lines: 35
Nntp-Posting-Host: slacvx.slac.stanford.edu