Problem solve Get help with specific problems with your technologies, process and projects.

Need to know who's signed on?

Think you're above using assistant level basic? Before you brush it off, take a look at by command WRKACTUSR. This command uses the WRKUSRJOB command with assistant level *BASIC to show interactive jobs. This interface allows you to send a message to the user and sign off the session. It's great for remote troubleshooting, making sure everyone is off the system before you do something, etc.


CMD        PROMPT('Work with Signed-on Users')          
PARM       KWD(USER) TYPE(*NAME) LEN(10) DFT(*ALL) +    
             SPCVAL((*ALL) (*)) PROMPT('User to send +  
             messages to')                              

Command processer: 
PGM        PARM(&USER) /* Work with Active Users */ 
DCL        VAR(&USER) TYPE(*CHAR) LEN(10)           

Feedback from members

From Ben Allgood:
Why not use option 12 after GO MANAGESYS?

From Kathryn Greenley:
Had great fun with WRKACTUSR! Didn't realize I had the power to sign other users off! Only trouble is my identity as chief culprit is disclosed in the job log! How do I stop a job log from being produced?

From Glenn Fojtasek:
I found the tip interesting and might use it from time to time. I had already created a command for myself that shows me similar information, but I can't use it to send a message to the user.

All of my interactive users will be in QINTER or QCTL (if someone is using the system console). My command uses WRKACTJOB, displaying the QINTER and QCTL subsystems. I find that this gives me two features that I like: I can sort on any column (like user profile) and I can see how much CPU the user is using. The downside to this is the overhead associated with running WRKACTJOB.

From Michael Fiorillo:
I did something similar by creating duplicate object WRKUSRJ from command WRKUSRJOB, then changing command defaults to STATUS(*ACTIVE) JOBTYPE(*INTERACT). I get the same info in a different format without specifying ASTLVL(*BASIC) (my default is *INTERMED).

From Karen Zitek:
I showed the WRKACTUSR command to another programmer that has to get people off the machine for a monthly routine. He is anxious to try it, he thinks it will help him. Thanks.

Dig Deeper on Performance

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.