AS/400 HELP    

                                      "USERJOB" 

DISPLAY  ONLINE USER’S CURRENT PROGRAM & SCREEN FORMAT

 

     

 

 

USERJOB displays a list of online users  with the following information;

 

USER ID    WORKSTATION   FUNCTION   SCREEN    FORMAT    TYPE        LIBRARY 

F4   Toggles to show;

USER ID    WORKSTATION   PROGRAM   LIBRARY  MODULE   LIBRARY STATEMENT

 

 

USERJOB uses

 API  QUSLJOB to  get all interactive jobs into a user space.

 API  QUSRJOBI  retrieves the FUNCTION

 API  QWSRTVOI  retrieves the workstation screen info 

 API  QWVRCSTK  retrieves the call stack  info  (see NOTES disclaimer/caveat below)       

 

USERJOB was developed and tested  on a  170  at V5r1 it was recompiled down to V4r4 and will not run at any lower level.

 

 

PC INSTRUCTIONS:

Download "USERJOB” to your PC.

Go to a DOS session and enter the following;

FTP SYSTEM                                        (system = your AS/400’s name or IP address)

Enter a valid user id and password

CD QGPL

LCD C:\DIRECTORY (directory= the directory on your pc where you downloaded “userjob.savf”

QUOTE    SITE     NAMEFMT   1

BIN

PUT       USERJOB.SAVF

QUOTE   RCMD   RSTLIB   SAVLIB(USERJOB)   DEV(*SAVF)   SAVF(QGPL/USERJOB)

 Note:  If there is a security problem restoring all objects with the command above,  sign on to your as/400 as Qsecofr and run RSTLIB  from the command line.

 

   DOWNLOAD userjob.savf              

AS/400 INSTRUCTIONS:

ADDLIBLE USERJOB

UJ

 

 

NOTE:             USERJOB  looks at the call stack of each online job. It saves the last non QSYS program before QWSGET as the current program/module.      Otherwise it saves the last non QSYS job.  This logic may or may not work on your AS/400.  As the source code is included  you can  modify USERJOB to meet your needs.

NOTE2:           USERJOB  is SLOW