How to check for Active Users in a LANSA system

Date:22 April 2016
Product/Release:LANSA for i (All versions)
Abstract:How to check for active users in a LANSA system before performing a LANSA upgrade, applying an EPC or following instructions to apply a LANSA for i patch
Submitted By:LANSA Technical Support

Note: In all the commands below, the libraries indicated by <pgmlib>, <dtalib>, <comlib> and <jsmlib> and the HTTP Instance indicated by <LANSAPGMLIB> can be obtained by executing the command LANSA About at the IBM i command line.

To check for active users in your LANSA system, use the following procedure:

  1. Sign on to the IBM i using the Partition Security Officer profile, QSECOFR or as some other user that is part of the QSECOFR group.
  2. If the Command Entry screen is not already displayed, then invoke it by using this command:
    CALL QCMD
  3. Execute the LANSA About as per the note above to obtain the correct library names and HTTP Instance name.
  4. Make sure HTTP server for that LANSA for i system is not in use.
    To stop any HTTP server that LANSA is using
    ENDTCPSVR SERVER(*HTTP) HTTPSVR(<LANSAPGMLIB>)
  5. Make sure that LANSA for i's listener and listener subsystem is not in use.
    To stop the LANSA listener that LANSA is using.
    ENDSBS SBS(<subsystem name(pgmlib)>) OPTION(*IMMED)
  6. Make sure that the LANSA for i's JSM subsystem is not in use.
    To stop the LANSA installation's JSM subsystem:
    ENDSBS SBS(<JSMLIB>) OPTION(*IMMED)
  7. By using the following commands you can check if the system to be upgraded is in use:
    WRKOBJLCK OBJ(<pgmlib>) OBJTYPE(*LIB)
    WRKOBJLCK OBJ(<dtalib>) OBJTYPE(*LIB)
    WRKOBJLCK OBJ(<comlib>) OBJTYPE(*LIB)
    WRKOBJLCK OBJ(<jsmlib>) OBJTYPE(*LIB)
  8. Make sure that no jobs/users are accessing LANSA using the following commands:
    WRKOBJLCK <pgmlib>/DC@A01 *DTAARA
    WRKOBJLCK <dtalib>/DC@F02 *FILE *FIRST
  9. If locks exist, ask the users to sign off or wait until the batch jobs have ended before continuing with the upgrade.
  10. If you use LANSA workstation products connected to your LANSA system, you may find that the listener job has a lock on the system. If a listener job is active, stop it by ending the subsystem it is running in.
  11. Repeat these WRKOBJLCK commands until there are no locks on the specified objects.
  12. NOW RETURN TO THE LANSA UPGRADE, EPC APPPLICATION OR PATCH INSTRUCTIONS AND COMPLETE THEM.
  13. After completing the task in step 12, the subsystems and HTTP instance need to be restarted, using the following commands
    Restart the LANSA Listener
    STRSBS SBSD(<pgmlib>/<pgmlib>)
    Restart the HTTP web server
    STRTCPSVR SERVER(*HTTP) httpsvr(<LANSAPGMLIB>)
    Restart JSM
    STRSBS SBSD(<jsmlib>/<jsmlib>)