1 LAST

  The LAST utility gives the time a user last logged in to the system.  
The utility also provides the Group in which that user resides, how 
many days from the present day it has been since the last time the user 
logged into the system and whether the user account is DISUSER'd.  If 
the user has never logged into the system, the program strips the 
creation date from the user's default directory (it is assumed that 
the directory was created at the same time as the user account).  
SYSPRV privilege is needed to use the utility.


2 parameters   

  The only parameter is the supplying of a username or a file with a list
of users to check (input may be a logical).  When a username is supplied
to the utility, all qualifiers are ignored except the /OUTPUT qualifier.

  i.e.

     $ LAST JBAKER
       JBAKER     GROUPNAME          No      10-JAN-1990    4 DAYS.

This means that if the program were run on 14-JAN-1990, the output would
look as it does above.

2 qualifiers   

  /ABOUT       - Tells some information about LAST.

  /ACCOUNT_FIELD
               - Uses the ACCOUNT field rather than OWNER field from
                 the SYSUAF.DAT file in the GROUP display.

  /ALL_USERS   - Displays the status of all users in alphabetical order.

  /BY_GROUP    - Allows the output to be broken up by group, displaying
                 them all.

  /DAYS        - Allows you to specify to report on users that have not
                 logged in within so many days.  The default is 0.

  /FULL        - Display additional information except that provided with
                 /LIST qualifier.

  /GROUP       - Allows you to single out a certain group.

  /HELP        - Displays the HELP text for the LAST utility.

  /LIST        - Allows you to use a database created using the LIST
                 utility and display the user's full name and telephone
                 number.

  /OUTPUT      - This qualifier allows you to write to an output file 
                 of your choice.

2 logical_names   

  The input of a user may be specified as a logical.  LAST will translate
the logical searching through PROCESS, JOB, GROUP and SYSTEM logical 
tables in that order.

  A logical is required to setup a list of users which is compliant with
VMS standards.  The logical should be defined as follows:

        $ DEFINE  LIST_OF_USERS   @DUA0:[SOME_DIRECTORY]USERS.LIS

When specifying this file for LAST, you need only to specify LIST_OF_USERS.
The file's format should be one user per line with no spaces preceeding the
username.  Blank lines are ignored.  If the file is specified as a logical
then it must be surrounded by double quotes.

2 /ABOUT

    Displays information concerning LAST.

2 /ACCOUNT_FIELD

    Uses the ACCOUNT field instead of the OWNER field in the SYSUAF file.
    When the /ACCOUNT_FIELD is used, all information is keyed in on
    the ACCOUNT field and all information used in the GROUP display is
    from the ACCOUNT field rather than the OWNER field.  (This qualifier
    is useful for sites that use the OWNER field to contain the actual
    user's name.)

2 /ALL_USERS   

    Displays the status of all users in alphabetical order.  May not
    be used with the /BY_GROUPS or /GROUP qualifiers.

2 /BY_GROUPS 

    Allows the output to be broken up by group, displaying them all.
    May not be used with the /ALL_USERS or /GROUP qualifiers

2 /DAYS 

    /DAYS=integer

    Allows you to specify to report on users that have not logged in 
    within so many days.  The default is 0.

2 /FULL

    Display additional information excluding that provided with /LIST
    qualifier.

2 /GROUP 

    /GROUP=groupname

    Allows you to single out a certain group for diplay.  May not be
    used with the /ALL_USERS or /GROUP qualifiers.

2 /HELP

    Displays the HELP text for the LAST utility.

2 /LIST

    /LIST=phone.file

    Allows you to specify a database file created by the LIST utility.
    Using this qualifier will display the user that is assigned to the
    username and their phone number.  (LIST file must have been created
    using LIST 2.0 or higher.)

2 /OUTPUT

    /OUTPUT=output.file

    This qualifier allows you to write to an output file of your choice.

2 examples

  The following are some examples of the LAST utility using the qualifiers.

 $ LAST /ALL_USERS
   LAST LOGIN RESULTS FOR THE  UNCLASSIFIED CLUSTER  ON THE DAY 16-JAN-1990.
   THE FOLLOWING USERS HAVE NOT USED THEIR ACCOUNTS FOR AT LEAST    0 DAYS:

                                       Lastlogin/        Days
   User     Group          Disusr     Creation Date   Since Used
   ----     -----          ------     -------------   ----------
   AAA      PC-GROUP         Yes       10-JAN-1990    6 DAYS
   AAA3     NERD_GROUP       No        10-DEC-1989   37 DAYS **NEVER USED**
    .           .                        .            .
    .           .                        .            .
    .           .                        .            .

  This will display to the screen the loggin status of all the users in 
  alphabetical order.  (Note:  **NEVER USED**  means what it says.  The
  date used, is the date the user directory was created.)

  $ LAST /DAYS=90 /GROUP="SOME GROUP" /OUTPUT=LAST.TXT

  The output file, LAST.TXT looks as follows:

   LAST LOGIN RESULTS FOR THE  UNCLASSIFIED CLUSTER  ON THE DAY 16-JAN-1990.
   THE FOLLOWING USERS HAVE NOT USED THEIR ACCOUNTS FOR AT LEAST   90 DAYS:

                                       Lastlogin/        Days
   User     Group          Disusr     Creation Date   Since Used
   ----     -----          ------     -------------   ----------
   AUSER    user directory does not match UAF file.
   STUDENT  SOME GROUP       No       12-OCT-1989   96 DAYS
   ZAMFIR   SOME GROUP       Yes       3-NOV-1988  439 DAYS **NEVER USED**
    .           .                        .            .
    .           .                        .            .
    .           .                        .            .

  The list for the specified group is displayed.  This is the same for the
  qualifier /BY_GROUP, except no other groups will be tallied.  The 
  message displayed for AUSER is to note that the user has never logged
  in and that the attempt to open up the directory file was not successful.
  This should mean that SYSUAF.DAT contains the wrong directory as the 
  user's default.
