From:	CSBVAX::CSBVAX::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  9-NOV-1988 19:15
To:	MRGATE::"ARISIA::EVERHART"
Subj:	RE:: SYLOGOUT.COM equivalent???


Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Wed,  9 NOV 88 13:55:01 PDT
Received: from nusc-npt.arpa by KL.SRI.COM with TCP; Wed, 9 Nov 88 13:39:02 PST
Date: 9 Nov 88 16:36:00 EST
From: "V70NL::BULMER" <bulmer%v70nl.decnet@nusc-npt.arpa>
Subject: RE:: SYLOGOUT.COM equivalent???
To: "info-vax" <info-vax@kl.sri.com>

A hack, but one way I've seen it done quick and dirty is to define a logout
Symbol in SYLOGIN.COM such as:

$ LO*GOUT :== @SYS$MANAGER:SYLOGOUT.COM

Then, within SYLOGOUT.COM:

$ DELETE/SYMBOL LOGOUT
$ LOG

Of course, this does not prevent the savvy user (<- oxymoron?) from deleting
the symbol his/herself and bypassing SYLOGOUT.COM

Another possibility, is modifying DCLTABLES.EXE using your own version of
LOGOUT.CLD to point to your own image to perform whatever at logout
time.  You will have to perform a SET COMMAND LOGOUT to restore the
REAL LOGOUT command at some point in you image.

Now, if you NEED a forced command procedure, here's a REALLY big hack:

1) modify your DCLTABLES.EXE ( or for testing, just use set command
   to modify your own process comand tables) with this modified 
   LOGOUT.CLD using:

  A) $ SET COMMAND SYLOGOUT.CLD/TABLE=SYS$SHARE:DCLTABLES.EXE-
     /OUT=SYS$SHARE:DCLTABLES.EXE

  B) reINSTALL DCLTABLES.EXE with /SHARED/OPEN/HEAD  (you will have to
     log back in to get a copy of the modified tables.)

  Here is the modified LOGOUT.CLD (now called SYLOGOUT.CLD):

!************************************LOGOUT*************************************
define verb LOGOUT
   image     SYS$MANAGER:SYLOGOUT.EXE
   qualifier BRIEF
   qualifier FULL
   qualifier HANGUP
  
2) Create the new image SYLOGOUT.EXE:

! Program SYS$MANAGER:SYLOGOUT.FOR
!
	PROGRAM LOGOUT_PROGRAM

	CHARACTER*80  LOGOUT_CMD
        CHARACTER*80  COMMAND_LINE

! Get the rest of the command line (everything following the "$ LO")
	ISTAT = LIB$GET_FOREIGN(LOGOUT_CMD,,,) 

! Pass the entire command line to the SYLOGOUT.COM procedure for invocation
! after SYLOGOUT.COM executes.	
	COMMAND_LINE='@SYS$MANAGER:SYLOGOUT.COM '//'LOGOUT '//LOGOUT_CMD

! Exit this program and execute SYS$MANAGER:SYLOGOUT.COM.  The logout command
! line that the user typed will be passed as P1 thru P8
	CALL LIB$DO_COMMAND(COMMAND_LINE)

	END

3) Now create SYLOGOUT.COM to do you what you want.  After you do what you
   want then add the following steps to the end of the procedure so that the
   user really logs out.

   $! SYS$MANAGER:SYSLOGOUT.COM
   $!
   .
   .
   .
   $!
   $! Define the "real" logout command in process command tables.
   $!
   $ SET COMMAND SYS$MANAGER:LOGOUT.CLD
   $! 
   $!Execute the line as typed by the user (e.g.  LOG /FULL /HANGUP)
   $ 'P1' 'P2' 'P3' 'P4' 'P5' 'P6' 'P7' 'P8'

   where the following is the real VMS V4.6 logout command definition as
   obtained by the marvelously useful VERB utility (file LOGOUT.CLD as
   named above).

!************************************LOGOUT*************************************
define verb LOGOUT
   cliroutine LOGOUT
   qualifier BRIEF
   qualifier FULL
   qualifier HANGUP

------------------------------------

   While I have never used this method for LOGOUT, we do have it working
for some users using the EDIT command.  If forces them through a tailored
EDIT command procedure to track who edited what files when, and it does
actually work.  It's primary benefit is that the user can type any valid
qualifiers, parameters associated with the real command and the CLI will
do all the validation for you.  Redefining a simple symbol does not
allow this.

   I do not know if you will run into any problems with LOGOUT, using it 
in this manner.  I do notice that the verb LOGOUT is defined as a
"cliroutine" in the real command definition and not an image as most other
DCL command verbs are.

   I suppose that you could apply this method to the STOP/ID command so that
you could force them through your SYLOGOUT.COM.

--------------------------------------------------------------------------------
                                        | -------------  ---      ------
Steven R. Bulmer  (bulmer@nusc.arpa)    | |           | /   \     |    |
Technology Applications Inc.            | ----.   .----/     \    |    |
working at Naval Underwater Systems Ctr.|     |   |   /   ^   \   |    |
New London, CT 06320                    |     |   |  /   /_\   \  |    |
(203) 440-6373                          |     |   | /   _____   \ |    |
                                        |     |___|/___/     \___\|____|
--------------------------------------------------------------------------------


