The Work with Active Jobs (WRKACTJOB) command has been around forever, and I'm sure most--if not all--of you have used it. But did you know that you can actually subset the data you view with that command? You can.
If you simply type WRKACTJOB and press Enter, you get a screen that shows the list of all the active jobs for each subsystem on the machine. Prompting WRKACTJOB gives you the display shown in Figure 1, which doesn't offer any indication that there are any more options to the command. But there are.
Figure 1: The basic WRKACTJOB command doesn't reveal the options you can choose from. (Click images to enlarge.)
Just press the infamous F10, and the command prompt will show you the additional, hidden parameters as illustrated in Figure 2:
Figure 2: Pressing F10 reveals many hidden parameters.
If you're like me, you like to see the parameter's keyword, so a quick F11 is issued to switch the display to the following:
Figure 3: F11 adds your keywords.
What a surprise, more options! You can subset the WRKACTJOB display by subsystem name, job name, and system usage. In addition, you can initially sequence the display by any of the columns displayed by the command (similar to pressing F16/shift+F4 on the column while the display is visible).
The two parameters I used most are the Subsystem (SBS) and Job name (JOB) parameters. For example, if I want to look at all the Apache Web server jobs running on my system, I can issue the following command:
You can use the JOB and SBS parameters to subset the display so that you see only what you want to see. This cuts down on all the paging up and down through the list.
One final note about WRKACTJOB: Once the display is visible, you'll notice that the traditional "position to" function key is missing. Instead, IBM implemented a search facility so you can position to anything on the display. To get to the Find prompt, run the WRKACTJOB command and press the F7 key to display the screen shown in Figure 4.
Figure 4: Use the F7 key in place of the traditional "position to" key.
So there you go. There's more to WRKACTJOB than just issuing the command and using the page up/down keys to search for the job you're interested in.
Bob Cozzi is a programmer/consultant, writer/author, and software developer. His popular RPG xTools add-on subprocedure library for RPG IV is fast becoming a standard with RPG developers. His book The Modern RPG Language has been the most widely used RPG programming book for more than a decade. He, along with others, speaks at and produces the highly popular RPG World conference for RPG programmers.
LATEST COMMENTS
MC Press Online