Work Management APIs: Keeping an Eye on Job Activity.

Monitor, manage, and interact with subsystems, job queues, and jobs.

One thing that fascinates me about APIs is the ways in which they let us create and tailor the tools we need in our daily work to best meet our specific requirements. IBM has invested a significant amount of work and effort into providing GUI work management tools such as Navigator for i. These contemporary offerings include many facilities and a lot of information not available in older, native commands.

So at times, I’m confronted with requests for enhancements of and alternatives to CL commands from people who, in their daily jobs, lack access to the GUI tools, or they want a shortcut to that functionality without having to start Navigator. That’s when I turn to the Work Management and User Interface Management (UIM) APIs, which I’ll demonstrate in this article.

A Collection of Past CL Commands

In the past, I’ve written and published many work management CL commands, so in this article I’ll present a collection of these utilities. All of the commands have been updated and enhanced to reflect additions made and changes introduced after their initial release. I’ve also included a new command not previously published.

The objective of collecting the CL commands in question is twofold. The main purpose is to establish a tool that lets you easily monitor and manage the job streams as jobs are executing in all the subsystems configured on your system. The other purpose is to provide two levels of access to the overview. The first is an interface where you can monitor and interact with the subsystems, job queues, and jobs listed. An alternate interface, which only lets you display the various configuration entities, targets a wider audience that can monitor the system workload as it progresses without compromising operational security and integrity.

For the management-capable version, I provide in a single panel a list of all active subsystems, each specifying a total of currently active jobs and a total of jobs that are currently waiting in the subsystem’s attached job queues. If a particular situation in one subsystem catches your eye, the list panel lets you select that subsystem and list all its job queues, again displaying the total jobs currently active from a specific job queue and the total jobs waiting on the queue. The job queue list in turn provides access to a panel that shows all active jobs submitted through the job queue and the jobs waiting on the job queue. The jobs are listed in the order dictated by each job’s status and job priority, letting you monitor and predict the job flow in a single view.

I’ve named the three commands Work with Subsystem Activity (WRKSBSACT), Work with Subsystem Job Queues (WRKSBSJOBQ), and Work with Job Queue Jobs (WRKJOBQJOB). The corresponding display only-capable commands are Display Subsystem Activity (DSPSBSACT), Display Subsystem Job Queues (DSPSBSJOBQ), and Display Job Queue Jobs (DSPJOBQJOB). The Additional Message Information panel discussed in “Work Management APIs—Putting the Pieces Together” is accessible from both versions. The display version provides access to the Display Job Status (DSPJOBSTS) command and the Display User Jobs (DSPUSRJOB) command, which I’ve also written, although the former command was previously unpublished.

Download the save file containing the source code.

Read the entire article.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s