com.ibm.as400.resource

Class RJobList

  • All Implemented Interfaces:
    java.io.Serializable

    Deprecated. 
    Use JobList instead, as this package may be removed in the future.

    public class RJobList
    extends SystemResourceList
    The RJobList class represents a list of server jobs. The following selection IDs are supported:

    Use one or more of these selection IDs with getSelectionValue() and setSelectionValue() to access the selection values for an RJobList. The following sort IDs are supported:

    Use one or more of these sort IDs with getSortValue() and setSortValue() to access the sort values for an RJobList.

    RJobList objects generate RJob objects.

    // Create an RJobList object to represent a list of jobs.
    AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD");
    RJobList jobList = new RJobList(system);
    
    // Set the selection so that only active jobs with the name // "QZDASOINIT" are included in the list. jobList.setSelectionValue(RJobList.PRIMARY_JOB_STATUSES, new String[] { RJob.JOB_STATUS_ACTIVE }); jobList.setSelectionValue(RJobList.JOB_NAME, "QZDASOINIT");
    // Set the sort value so that the list is sorted by // user name and job type. Object[] sortValue = new Object[] { RJob.USER_NAME, RJob.JOB_TYPE }; jobList.setSortValue(sortValue);
    // Open the list and wait for it to complete. jobList.open(); jobList.waitForComplete();
    // Read and print the job numbers for the jobs in the list. long numberOfJobs = jobList.getListLength(); for(long i = 0; i < numberOfJobs; ++i) { RJob job = (RJob)jobList.resourceAt(i); System.out.println(job.getAttributeValue(RJob.JOB_NUMBER)); }
    // Close the list. jobList.close();
    See Also:
    RJob, Serialized Form
    • Field Detail

      • ALL

        public static final java.lang.String ALL
        Deprecated. 
        Constant indicating that all jobs are returned.
        See Also:
        Constant Field Values
      • BLANK

        public static final java.lang.String BLANK
        Deprecated. 
        Constant indicating that a blank value is used.
        See Also:
        Constant Field Values
      • CURRENT

        public static final java.lang.String CURRENT
        Deprecated. 
        Constant indicating that the current value is used.
        See Also:
        Constant Field Values
      • JOB_NAME

        public static final java.lang.String JOB_NAME
        Deprecated. 
        Selection ID for job name. This identifies a String selection, which represents a specific job name. Possible values are:
        • "*" - Only the job that this program is running in.
        • CURRENT - All jobs with the current job's name.
        • ALL - All job names.
        • A job name.
        The default is ALL.
        See Also:
        Constant Field Values
      • JOB_NUMBER

        public static final java.lang.String JOB_NUMBER
        Deprecated. 
        Selection ID for job number. This identifies a String selection, which represents a specific job number. Possible values are:
        • ALL - All job numbers.
        • A job number.
        The default is ALL.
        See Also:
        Constant Field Values
      • PRIMARY_JOB_STATUSES

        public static final java.lang.String PRIMARY_JOB_STATUSES
        Deprecated. 
        Selection ID for jobs on primary job statuses. This identifies a String array selection, which represents the primary statuses of the jobs to be included in the list. Possible values for each element of the array are:
        See Also:
        Constant Field Values
      • USER_NAME

        public static final java.lang.String USER_NAME
        Deprecated. 
        Selection ID for user name. This identifies a String selection, which represents a specific user profile name. Possible values are:
        • CURRENT - All jobs with the current job's user profile.
        • ALL - All jobs regardless of user name.
        • A user profile name.
        The default is ALL.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RJobList

        public RJobList()
        Deprecated. 
        Constructs an RJobList object.
      • RJobList

        public RJobList(AS400 system)
        Deprecated. 
        Constructs an RJobList object.
        Parameters:
        system - The system.
    • Method Detail

      • establishConnection

        protected void establishConnection()
                                    throws ResourceException
        Deprecated. 
        Establishes the connection to the system.

        The method is called by the resource framework automatically when the connection needs to be established.

        Overrides:
        establishConnection in class ResourceList
        Throws:
        ResourceException - If an error occurs.