Jobs

The jobs vaccess (GUI) components allow a Java™ program to present lists of server jobs and job log messages in a GUI.

The following components are available:

You can use AS400Panes, VJobList objects, and VJob objects together to present many views of a job list or job log.

To use a VJobList, set the system, name, number, and user properties. Set these properties by using a constructor or through the setSystem(), setName(), setNumber(), and setUser() properties.

To use a VJob, set the system property. Set this property by using a constructor or through the setSystem() method.

Either the VJobList or VJob object is then "plugged" into the AS400Pane as the root, using the pane's constructor or setRoot() method.

VJobList has some other useful properties for defining the set of jobs that are presented in AS400Panes. Use setName() to specify that only jobs with a certain name appear. Use setNumber() to specify that only jobs with a certain number appear. Similarly, use setUser() to specify that only jobs for a certain user appear.

When AS400Pane, VJobList, and VJob objects are created, they are initialized to a default state. The list of jobs or job log messages are not loaded at creation time. To load the contents, the caller must explicitly call the load() method on either object. This will initiate communication to the server to gather the contents of the list.

At run-time, right-click a job, job list, or job log message to display the shortcut menu. Select Properties from the shortcut menu to perform actions on the selected object:

Users can only access jobs to which they are authorized. In addition, the Java program can prevent the user from performing actions by using the setAllowActions() method on the pane.

The following example creates a VJobList and presents it in an AS400ExplorerPane:

                       // Create the VJobList object. Assume
                       // that "system" is an AS400 object
                       // created and initialized elsewhere. 
     VJobList root = new VJobList (system);

                       // Create and load an
                       // AS400ExplorerPane object.
     AS400ExplorerPane explorerPane = new AS400ExplorerPane (root);
     explorerPane.load ();

                       // Add the explorer pane to a frame.
                       // Assume that "frame" is a JFrame
                       // created elsewhere.
     frame.getContentPane ().add (explorerPane);
Examples

This VJobList example presents an AS400ExplorerPane filled with a list of jobs. The list shows jobs on the system that have the same job name.

The following image shows the VJobList graphical user interface component:

VJobList graphical user interface component