LAST 2.4-A The LAST program provides information on when the last time a user logged in, what group they are from and how many days it has been. This is done using system routines. If the user has never logged in, then a USEROPEN routine starts up RMS services to extract the creation date of the user's default loggin area. This was done under the assumption that the user's directory was created when the account was created. DIGITAL otherwise keeps no record of when an account was added. ************************************************************************** Modifications: 1) (fix) Fix an error that occurs in the program when a system does not use the SYSGEN parameter SCSNODE. In this situation, first translate SYS$NODE logical, and if this test fails, then display the node name as a string of '$'. (Partial coding of this is credited to Ricardo del Cueto of the Institute of Electric Investigations in Mexico. 2) (new) /ACCOUNT_FIELD qualifier added. Allow the displaying of the ACCOUNT field over the OWNER field from SYSUAF.DAT. 3) (new) /FULL qualifier to provide additional information. 4) (new) Provide last login time as well as date. Used with /FULL option. (suggested by Eva Hatcherson of Naval Surface Warfare Center DD) 5) (new) Provide day of the week. Used with /FULL option. (suggested by Eva Hatcherson of Naval Surface Warfare Center DD) 6) (mod) Display format cleaned up for better readability. 7) (fix) Errors that occurred under DEC FORTRAN 6.0 compiler have been fixed. 8) (fix) Error that occurred when not supplying either a username, input file or a qualifier for the type of report to generate. (discovered by James Horn of Sam Houston State University) 9) (fix) Translation of SYSUAF logical when using an alternate area over SYS$SYSTEM:SYSUAF.DAT. (discovered by Paul Carreras of University of Arkansas Medical Services) 10) (mod) Cleanup of logical name translation for file of users, or individual username logicals. 11) ** ALPHA TESTED for VMS AXP 1.5 (no source changes seen as needed). ************************************************************************** Testing info: Tested to VMS VAX 6.0, VMS AXP 1.5 and DEC FORTRAN 6.1 ************************************************************************** The following files are included with this utility: AAAREADME.1ST - Obviously that's this file. LAST.BUILD - Command file for building parts of utility. LAST.CLD - Obviously the command definition file. LAST.EXE - Obviously the executable. LAST.EXE_ALPHA - AXP ready executable. LAST.FOR - Obviously the source file. LAST.HLB - Obviously the help module. LAST.HLP - Obviously the help source. LAST.OBJ - Obviously the object file. LAST.OBJ_ALPHA - AXP ready object file. LAST.OPT - Holds version of LAST utility. UAFDEF.INC - An include file for the defining of a structure. ************************************************************************** To make this work: 1) The .CLD file must be changed accordingly for the correct directory structure of the executable image and location of LAST.HLB. (The /HELP qualifier can be commented out if you wish to add the help file to the normal system help files.) The affected areas within the .CLD file are IMAGE and HELP. To activate this command you may: $ SET COMMAND LAST.CLD or add it to your DCLTABLES.EXE file: $ SET COMMAND LAST.CLD /TABLE=SYS$COMMON:[SYSLIB]DCLTABLES.EXE - /OUTPUT=SYS$COMMON:[SYSLIB]DCLTABLES.EXE $ INSTAL REPLACE SYS$COMMON:[SYSLIB]DCLTABLES.EXE If using the later, log out and back in for the command to take effect. 2) If your SYSUAF.DAT file is not in SYS$SYSTEM: directory, make sure the logical SYSUAF is defined in the SYSTEM logical table pointing to this file. $ DEFINE/SYSTEM/EXEC SYSUAF SYS$COMMON:[SYSEXE]SYSUAF.DAT If you are consistently getting a message that users do not exist when they actually do, check this logical. 3) At present, the program will only take at most 15000 users. To up this, Change the value MAX_USERS in UAFDEF.INC and recompile with LAST.BUILD. 4) If using LIST hook, make sure using version 2.0 or higher of LIST. Change LAST.CLD to note the default list file May also set /LIST qualifier as a default qualifier by adding a line after the qualifier specification: QUALIFIER LIST NEGATABLE DEFAULT ! add this line to make it a default VALUE (TYPE=$FILE, DEFAULT=some.file) !some file is default !LIST file 5) If you want the /FULL qualifier as the default, perform the same operation as described in step 4. QUALIFIER FULL NEGATABLE DEFAULT ! add this line to make it a default 6) *If you want the display to use the ACCOUNT field instead of the OWNER field in the SYSUAF.DAT file, then remove the comment symbol from the DEFAULT option of the ACCOUNT_FIELD qualifier. 7) If you need to recompile for any reason, use LAST.BUILD so that the options file is sure to be loaded. 8) Account records with a directory of [NOWHERE] are not displayed. This is to exclude default accounts from reports. ************************************************************************** If there are any questions, comments, or suggestions: Jonathan C. Baker Naval Surface Warfare Center Code N86 Dahlgren, VA 22448 (703)663-8705 system_jb@128.38.14.201 system_jb@unode1.nswc.navy.mil