.TITLE WHOPAR - WHO TABLE PARSER .IDENT /01/ .ENABL LC ;+ ; ; Free software BY ; Project Software & Development, Inc. ; ; This software is furnished for free and may be used and copied as ; desired. This software or any other copies thereof may be provided or ; otherwise made available to any other person. No title to and ; ownership of the software is hereby transferred or allowed. ; ; The information in this software is subject to change without notice ; and should not be construed as a commitment by PROJECT SOFTWARE ; AND DEVELOPMENT, INC. ; ; PROJECT SOFTWARE assumes no responsibility for the use or reliability ; of this software on any equipment whatsoever. ; ; Project Software & Development, Inc. ; 14 Story St. ; Cambridge, Ma. 02138 ; 617-661-1444 ; ; ; Title: WHOPAR.MAC ; Author: Gary Larsen ; Date: July 21, 1982 ; ; Description: ; ; Table parse for WHO program. ; ; ; Modification History: ; ;- .ENABL AMA .NLIST BEX .MCALL ISTAT$, STATE$, TRAN$ ;+ ; ; WHO is a program used to display information in the accounting file. ; ; The valid commands are: ; ; EXIT ; Exits from WHO. You can also type CTRL/Z to exit. ; ; HELP [subtopic] or ? ; Displays help information. ; ; Examples: ; WHO HELP ; WHO HELP GROUP ; ; ME ; This displays the entry for your login UIC. ; ; Example: ; WHO ME ; ; SHOW * ; Displays all entrys in the accounting file. ; ; Example: ; WHO SHOW * ; ; SHOW [uic] ; Displays the entry for the specified UIC. The ; left and right brackets are required syntax. ; ; Example: ; WHO SHOW [201,1] ; ; SHOW user_name ; Displays the entry for the specified user name. The ; name can be either the first or last name. ; ; Example: ; WHO SHOW ROBIN ; ; The SHOW command was added to be compatible with the WHO ; program on VAX/VMS. ; ; ; The following switches can be appended to any of the above commands to ; display specific accounting entrys. ; ; The valid switches are: ; ; /CLI=cli_name ; Displays all entrys with the specified CLI name. ; (CLI = Command Line Interpreter; usually MCR or DCL). ; ; Example: ; WHO /CLI=MCR ; ; /DEVICE=system_disk_name[:] ; Diplay all entrys with the specified system disk name. ; The format is 'ddnn'; where 'dd' is the device mnemonic ; and 'nn' is the unit number. The colon is optional. ; ; Example: ; WHO /DEVICE=DL0: ; ; /FULL ; Displays a full report. This causes the last logon date ; and time and total number of logons to be displayed. ; ; /GROUP=group_number ; Displays all entrys with the specified group number. ; ; Example: ; WHO /GROUP=201 ; ; /[-]HEADER ; Enables or disables printing the header message. ; The default is to display the header message. ; ; Example: ; WHO /-HEADER ; ; /OUTPUT=file_name ; Write the accounting report to the specified file name. ; If the file name is omitted, the default name is WHO.RPT. ; If the extension is omitted, .RPT is appended. ; ; Example: ; WHO /OUTPUT=ROBIN ; ; /SUMMARY ; Displays a summary report. This is the default. ; A summary report is also displayed if the RETURN key ; is typed in response to the WHO prompt. ; ; Examples: ; WHO /SUMMARY ; WHO ; WHO>(RETURN key) ; ; /[-]TRAILER ; Enables or disabled printing the trailing message. ; The default is to display the number of entrys selected. ; ; Example: ; WHO /-TRAILER ; ; /UIC=[group,member] ; Displays the entry for the specified UIC. The left ; and right brackets are optional. ; ; Examples: ; WHO /UIC=[201,1] ; WHO /UIC=1,24 ; ; /USER=user_name ; Displays the entry for the specified user name. The ; name can be either the first or last name. ; ; Example: ; WHO /USER=ROBIN ; ; ; Mulitple switches can be appended together. ; ; Example: ; WHO /GROUP=201/CLI=DCL ; ; Displays all entrys in group 201 using DCL. ; ; ; Switches can be abbreviated to one character. ; ;+ ; Define start of state and keyword tables. ISTAT$ STATE, KEYWRD ; Now define the actual state table. .GLOBL START ; Next is a possible option or text of the message. STATE$ START TRAN$ '/,SWITCH TRAN$ '?,HELP TRAN$ "EXIT",$EXIT,EXIT TRAN$ "HELP",HELP TRAN$ "ME",START,SAVEME TRAN$ "SHOW",SHOW TRAN$ $EOS,$EXIT ;********************************************************************** ; Found the start of a switch. ; ; TRAN$ key_word,next_state,action_routine,bit,status_word STATE$ SWITCH TRAN$ '-,NEGSW TRAN$ "CLI",CLI TRAN$ "DEVICE",DEVICE TRAN$ "FULL",START,,B.FULL,STATUS TRAN$ "GROUP",GROUP TRAN$ "HEADER",START,,B.HDR,STATUS TRAN$ "HDR",START,,B.HDR,STATUS TRAN$ "OUTPUT",FILE TRAN$ "SUMMARY",START,NOFULL TRAN$ "TRAILER",START,,B.TRL,STATUS TRAN$ "UIC",UIC TRAN$ "USER",USER ;********************************************************************** ; Negating a switch. STATE$ NEGSW TRAN$ "FULL",START,NOFULL TRAN$ "HDR",START,NOHDR TRAN$ "HEADER",START,NOHDR TRAN$ "TRAILER",START,NOTRL ;********************************************************************** ; Specifying a CLI name. STATE$ CLI TRAN$ '= STATE$ CLOOP TRAN$ '/,SWITCH,,B.CLI,STATUS TRAN$ $ANY,CLOOP,SCLI TRAN$ $EOS,$EXIT,,B.CLI,STATUS ;********************************************************************** ; Specifying a device name. STATE$ DEVICE TRAN$ '= STATE$ TRAN$ $ALPHA,,SDEV STATE$ TRAN$ $ALPHA,,SDEV STATE$ DLOOP TRAN$ '/,SWITCH,,B.DEV,STATUS TRAN$ ':,START,,B.DEV,STATUS TRAN$ $NUMBR,DLOOP,SUNIT,B.DEV,STATUS TRAN$ $EOS,$EXIT,,B.DEV,STATUS ;********************************************************************** ; Specifying an output file. STATE$ FILE TRAN$ '= STATE$ FLOOP TRAN$ '/,SWITCH,OFILE TRAN$ $ANY,FLOOP,SFILE TRAN$ $EOS,$EXIT,OFILE ;********************************************************************** ; Specifying a group. STATE$ GROUP TRAN$ '= STATE$ TRAN$ $NUMBR,START,SGROUP ;********************************************************************** ; User wants some HELP. STATE$ HELP TRAN$ $ANY,HELP,SHELP TRAN$ $EOS,$EXIT,GETHLP TRAN$ $LAMDA,START,GETHLP ;********************************************************************** ; Show a particular UIC, USER, or * (for all) -- VAX compatible. STATE$ SHOW TRAN$ '[,UIC1 TRAN$ '*,START,NOFULL TRAN$ $LAMDA,ULOOP ;********************************************************************** ; Specifying a UIC STATE$ UIC TRAN$ '= STATE$ UIC1 TRAN$ '[,UIC2 TRAN$ $LAMDA STATE$ UIC2 TRAN$ $NUMBR,,SUIC STATE$ TRAN$ <',> STATE$ TRAN$ $NUMBR,,SMEM STATE$ TRAN$ '],START TRAN$ $LAMDA,START ;********************************************************************** ; Specifying a USER name. STATE$ USER TRAN$ '= STATE$ ULOOP TRAN$ '/,SWITCH,,B.USER,STATUS TRAN$ $ANY,ULOOP,SUSER TRAN$ $EOS,$EXIT,,B.USER,STATUS ; The next STATE$ is needed for the end of the table. STATE$ .END