Jobs

The jobs graphical user interface components allow a Java program to present lists of AS/400 jobs and job log messages in a graphical user interface.

The following components are available:

  • A VJobList object is a resource that represents a list of AS/400 jobs for use in AS/400 panes.
  • A VJob object is a resource that represents the list of messages in a job log for use in AS/400 panes.

You can use AS/400 panes, 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 AS/400 pane 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 AS/400 panes. Use setName() to specify that only jobs with a certain name should appear. Use setNumber() to specify that only jobs with a certain number should appear. Similarly, use setUser() to specify that only jobs for a certain user should appear.

When AS/400 pane, 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 AS/400 system to gather the contents of the list.

At run-time, a user can perform actions on any job list, job, or job log message through the pop-up menu.

The following menu item is available for job lists:

  • Properties - allows the user to set the name, number, and user properties. This may be used to change the contents of the list.
The following action is available for jobs:
  • Properties - displays many properties such as the type and status.
The following action is available for job log messages:
  • Properties - displays many properties such as the full text, severity, and time sent.

Users can only access jobs to which they are authorized. In addition, the caller 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:


[ Legal | AS/400 Glossary ]