.st0{fill:#FFFFFF;}

WRKACTJOB – Working With Active Jobs on IBM I, AS400, and Series Systems 

 April 7, 2021

By  NickLitten

WRKACTJOB is DSPACTJOB on steroids

Every process that runs on an IBM i System is a #JOB.

Using the WRKACTJOB command is pretty intuitive, since you are working with all the active jobs on the system you are literally asking your IBM i to show you all the active processes and allow you to view, change or end those process — that is what WORK means in the IBMi world

The Work with Active Jobs (WRKACTJOB) command allows you to work with performance and status information for the active jobs in the system. The sequence of jobs can be changed with the Sequence (SEQ) parameter or through operations on the display.

IBM Pointy Heads on their own website

What does the WRKACTJOB screen look like?

wrkactjob on the backbeat system

The default sequence of displayed jobs is to show the subsystems in alphabetic sequence and all the jobs within those. This display sequence can be changed using the Sequence (SEQ) parameter or through using the PF keys on the screen. This does not affect execution priority or performance sequence, it changes merely the way you see those sobs.

The difference between the DSPACTJOB and WRKACTJOB is obvious – DISPLAY just shows you and WORK lets you make changes to the jobs.

We can change how we see WRKACTJOB by prompting the command before pressing enter:

prompting the wrkactjob comand

Let’s look at some of these WRKACTJOB parameters in more detail:

Output (OUTPUT)

Specifies whether the output from the command is displayed at the requesting work station or printed with the job’s spooled output. The output is displayed for interactive jobs or printed with the job’s spooled output for non-interactive jobs.

*PRINT The output is printed with the job’s spooled output.

snug cbd discount coupon 15% off

20% Off with Coupon: NICKLITTEN

I highly recommend the SNUG CBD Tincture to help keep you in the zone when programming!

In Partnership with SNUG CBD - American readers get 20% off

Reset status statistics (RESET)

Specifies whether the active job statistics are reset.
*NO The active job statistics are not reset. The measurement time interval is extended if a previous WRKACTJOB command has run in the current job. All active jobs are displayed.
*YES The active job statistics are reset. A measurement time interval of zero is used. All active jobs are displayed.

Subsystem (SBS)

Specifies the names of the subsystems (or all subsystems) whose active jobs are displayed.

Single values
*ALL All active jobs in the system are displayed. System jobs that are not associated with any subsystem are also displayed.

Other values (up to 25 repetitions)
name Specify the name of the subsystem to be displayed. All active jobs in this subsystem (including the monitor) are displayed.

CPU percent limit (CPUPCTLMT)

Specifies the minimum processing time percent value that a job must have before it is included on the display.

*NONE There is no minimum processing time limit that a job must have to be displayed.

0.1-99.9 Specify the minimum processing time percent limit that a job must have to be included on the display.

Response time limit (RSPLMT)

Specifies the minimum response time limit that a job must have before it is included on the display.

*NONE There is no minimum response time limit that a job must have to be displayed.
0.1-999.9 Specify the minimum response time limit that a job must have to be included on the display.

Sequence (SEQ)

Specifies the sequence of the active jobs that are displayed.

*SBS The jobs are ordered on the basis of the subsystem in which they are running. Jobs that run in a subsystem (auto-start jobs, interactive jobs, batch jobs, readers, and writers) are put in alphabetical order by job name, and are indented under the subsystem with which they are associated. Subsystem monitor jobs (with the jobs in the subsystem grouped under each monitor job) are put in alphabetical order and presented before system jobs. The system jobs are put in alphabetical order by job name, and are presented after the subsystem monitors and jobs in the subsystems.

*AUXIO Jobs are ordered by the number of auxiliary storage input/output (I/O) operations that have occurred during the measurement time interval. The largest values are presented first.

*CPU Jobs are ordered by the amount of processing time they have used since the job started. The largest values are presented first.

*CPUPCT Jobs are ordered by the percent of processing unit resource they have used during the measurement interval. The largest values are presented first.

*CURUSR Jobs are put in alphabetical order by the user profile under which the initial thread is currently running.

*FUNCTION Jobs are put in alphabetical order by the contents of the function field.

*INT Jobs are ordered by the number of operator interactions that have occurred during the measurement interval. The largest values are presented first. Non-interactive jobs are shown last and have a blank interaction field.

*JOB Jobs are put in alphabetical order by job name.

*NUMBER Jobs are ordered by job number. The largest values are presented first.

*POOL Jobs are ordered by the system pool in which they are running. The lowest values are presented first.

*PTY Jobs are ordered by priority of running. The highest priority values (0) are presented first.

*RSP Jobs are ordered by the average response time during the measurement interval. The largest values are presented first. Non-interactive jobs are shown last and have a blank interaction field.

*STS Jobs are put in alphabetical order by the contents of the status field.

*THREADS Jobs are ordered by the number of active threads. The jobs with the largest number of active threads are presented first.

*TMPSTG Jobs are ordered by the amount of temporary storage used. The jobs using the most storage are presented first.

*TYPE Jobs are put in alphabetical order by job type and job name within the same type.

*USER Jobs are put in alphabetical order by user name.

Job name (JOB)

Specifies the name of the active jobs to be displayed. Only active jobs within selected subsystems (based on the SBS parameter) are displayed. Subsystem monitor names only appear when *ALL or *SBS is specified. System jobs only appear when *ALL or *SYS is specified.

Qualifier 1: Job name
*ALL All the active jobs are displayed.

*SYS All active system jobs are be displayed. If a value other than the default is specified in the SBS parameter when using this value, an error message is issued.

*SBS All active subsystem monitors are displayed.

generic-name Specify all active jobs, that meet the criteria, that are to be displayed. System jobs and subsystem monitors are not displayed using this parameter.

name Specify the active job that is to be displayed. System jobs and subsystem monitors are not displayed using this parameter.

Automatic refresh interval (INTERVAL)

Specifies the interval (in seconds) to wait during the automatic refresh option. The default time is 300 seconds (5 minutes). Valid values range from 5 to 999 seconds. If this value is changed by the user, the value is saved and used as the default value. When automatic refresh is started the screen is refreshed automatically based on the time specified.

*PRV The interval of time used in the previous invocation. Until an interval is specified, 300 seconds is used.

5-999 Specify the delay time (in seconds) for automatic refresh.

WRKACTJOB Example

Since WRKACTJOB is showing the active jobs and allowing you to view them in real time – we can use the F5-Refresh and F10=Reset function keys to either refresh the run statistics for all jobs (since we started viewing them) or press F10 to reset that counter back to zero.

Confused? Think of viewing WRKACTJOB for the last 2 minutes and pressing F5 every few seconds. This will continually update the display showing the refreshed statistics since you started the command. So the percentage of CPU consumed would be the percentage of CPU consumed since you started the WRKACTJOB command. But by pressing F10 it just resets that counter start time so the further refreshes will be from the time you pressed F10

Let’s watch some basic WRKACTJOB operations

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

    Get In Touch

    Iā€™m always looking for awesome input, feedback and critique!

    >