.TITLE USEPAR - USERS TABLE PARSER .IDENT /1.0/ .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: USEPAR.MAC ; Author: Robin Miller ; Date: July 27, 1982 ; ; Description: ; ; Table parse for USERS program. ; ; ; Modification History: ; ;- .ENABL AMA .NLIST BEX .MCALL ISTAT$, STATE$, TRAN$ ;+ ; ; USERS is a program used to display the users logged on the system. You ; can display all users logged on, or a specific user by specifying the ; user name to display. ; ; Examples: ; USERS ; Displays all users logged on. ; USERS M ; Displays all users with the first ; ; or lastname starting with "M". ; ; The following switches can be appended to any of the above commands to ; display specific accounting entrys. ; ; The valid switches are: ; ; /FULL ; Displays a full report. This causes the last logon date ; and time and total number of logons to be displayed. ; ; ; /[-]HEADER ; Enables or disables printing the header message. ; The default is to display the header message. ; ; Example: ; USERS /-HEADER ; ; /OUTPUT=file_name ; Write the accounting report to the specified file name. ; If the file name is omitted, the default name is USERS.LOG. ; If the extension is omitted, .LOG is appended. ; ; Example: ; USERS /OUTPUT=ROBIN ; ; /SUMMARY ; Displays the total number of logged on users. ; ; Examples: ; USERS /SUMMARY ; ; /USER=user_name ; Displays the entry for the specified user name. The ; name can be either the first or last name. ; ; Example: ; USERS /USER=ROBIN ; ; ; Mulitple switches can be appended together. ; ; Example: ; USERS /OUTPUT=ROBIN.LOG/USER=ROBIN ; ; Displays all users logged on called ROBIN. ; ; ; 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$ $ANY,START,SUSER,B.USER,STATUS TRAN$ $EOS,$EXIT ;********************************************************************** ; Found the start of a switch. ; ; TRAN$ key_word,next_state,action_routine,bit,status_word STATE$ SWITCH TRAN$ '-,NEGSW TRAN$ "FULL",START,,B.FULL,STATUS TRAN$ "HEADER",START,,B.HDR,STATUS TRAN$ "HDR",START,,B.HDR,STATUS TRAN$ "OUTPUT",FILE TRAN$ "SUMMARY",START,,B.SUMM,STATUS TRAN$ "USER",USER ;********************************************************************** ; Negating a switch. STATE$ NEGSW TRAN$ "FULL",START,NOFULL TRAN$ "HDR",START,NOHDR TRAN$ "HEADER",START,NOHDR ;********************************************************************** ; Specifying an output file. STATE$ FILE TRAN$ '= STATE$ FLOOP TRAN$ '/,SWITCH,OFILE TRAN$ $ANY,FLOOP,SFILE TRAN$ $EOS,$EXIT,OFILE ;********************************************************************** ; 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