![Start of change](./delta.gif)
TRACKED_JOB_INFO table function
The TRACKED_JOB_INFO table function returns information about the requested jobs. The information can be used to resubmit the job. Some information can be provided on the SBMJOB CL command. Other information can be provided on the CHGJOB CL command.
Authorization: The caller must have *JOBCTL special authority.
- node-name-filter
- A string containing a node name in the job tracking files to be included in the result. If this parameter is omitted, information for all nodes is eligible to be returned.
- iasp-name-filter
- A string containing a job queue independent ASP name in the job tracking files to be included in the result. Can contain the special value *SYSBAS. If this parameter is omitted, information for all ASPs is eligible to be returned.
- job-queue-library-filter
- A string containing a job queue library name in the job tracking files to be included in the result. If this parameter is omitted, information for all tracked job queue libraries is eligible to be returned.
- job-queue-filter
- A string containing a job queue name in the job tracking files to be included in the result. If this parameter is omitted, information for all tracked job queue queues is eligible to be returned.
The result of the function is a table containing rows with the format shown in the following table. All the columns are nullable.
Column Name | Data Type | Description |
---|---|---|
NODE_NAME | VARCHAR(8) | The name of the IBM® i partition where the tracked job queue is located. |
QUALIFIED_JOB_NAME | VARCHAR(28) | The qualified job name. |
JOB_NAME | VARCHAR(10) | The name of the job. |
JOB_USER | VARCHAR(10) | The user profile for the job. |
JOB_NUMBER | VARCHAR(6) | The number of the job. |
COMMAND_OR_REQUEST_DATA | VARCHAR(20000) | The command the job will run or the request data that is placed
as an entry in the job's message queue. Contains the null value if no command or request data for the job has been set. |
JOB_ENTERED_SYSTEM_TIME | TIMESTAMP(0) | The timestamp for when the job was placed on the system. |
JOB_ACTIVE_TIME | TIMESTAMP(0) | The timestamp for when the job started. Contains the null value if the job has not started. |
JOB_END_TIME | TIMESTAMP(0) | The timestamp for when the job ended. Contains the null value if the job has not ended. |
JOB_QUEUE_ASP_NAME | VARCHAR(10) | The ASP device name where the job queue is located. |
JOB_QUEUE_LIBRARY | VARCHAR(10) | The name of the library containing the job queue. |
JOB_QUEUE | VARCHAR(10) | The name of the job queue for the submitted job. |
JOB_DESCRIPTION_LIBRARY | VARCHAR(10) | The name of the library containing the job description. |
JOB_DESCRIPTION | VARCHAR(10) | The name of the job description used for this job. |
JOB_END_SEVERITY | INTEGER | The return code of the job when it ended. Contains the null value if the job has not ended. |
PROCESSING_UNIT_TIME | BIGINT | The amount of processing unit time used by the job, in
milliseconds. Contains the null value if the job has not ended. |
JOB_QUEUE_PRIORITY | INTEGER | The scheduling priority of the job compared to other jobs on the same job queue. The highest priority is 0 and the lowest is 9. |
PRINTER_DEVICE_NAME | VARCHAR(10) | The printer device used for printing output from this job. |
OUTPUT_QUEUE_LIBRARY | VARCHAR(10) | The name of the library that contains the default output
queue. Contains the null value if OUTPUT_QUEUE contains a special value. |
OUTPUT_QUEUE | VARCHAR(10) | The name of the default output queue that is used for spooled output produced by this job. The default output queue is only for spooled printer files that specify *JOB for the output queue. Can contain the special value *DEV. |
OUTPUT_QUEUE_PRIORITY | INTEGER | The output priority for spooled output files that this job produces. The highest priority is 0, and the lowest is 9. |
JOB_ACCOUNTING_CODE | VARCHAR(15) | An identifier assigned to the job by the system to collect resource use information for the job when job accounting is active. |
RUN_PRIORITY | INTEGER | The priority at which the job or thread competes for the
processing unit relative to other jobs and threads that are active at the same time. The run
priority ranges from 1 (highest priority) to 99 (lowest priority). Contains the null value if the run priority for the job has not been set. |
PRINT_TEXT | VARCHAR(30) | The line of text that is printed at the bottom of each page of printed output for the job. |
ROUTING_DATA | VARCHAR(80) | The routing data that is used to determine the routing entry that
identifies the program to start for the routing step. Can contain the following special value:
|
CURRENT_LIBRARY | VARCHAR(10) | The current library. Can contain the following special value:
|
SYSTEM_LIBRARY_LIST_COUNT | INTEGER | The number of libraries in the system portion of the library list. |
SYSTEM_LIBRARY_LIST | VARCHAR(165) | The system portion of the library list. The list is an array of
11 character entries. Each entry contains a ten character name followed by one blank. Contains the null value if the system library list specified when the job was submitted was empty. |
USER_LIBRARY_LIST_COUNT | INTEGER | The number of libraries in the user portion of the library list. |
USER_LIBRARY_LIST | VARCHAR(2750) | The user portion of the library list. The list is an array of 11
character entries. Each entry contains a ten character name followed by one blank. Contains the null value if no user library list was specified when the job was submitted, or the specified library list was empty. |
INITIAL_JOB_ASP_GROUP | VARCHAR(10) | The initial setting for the auxiliary storage pool (ASP) group
name for the initial thread of the submitted job. Can contain the following special value:
|
MESSAGE_LOGGING_LEVEL | INTEGER | The type of information that is logged.
|
MESSAGE_LOGGING_SEVERITY | INTEGER | The severity level that is used in conjunction with the logging level to determine which error messages are logged in the job log. The values range from 0 through 99. |
MESSAGE_LOGGING_TEXT | VARCHAR(7) | The level of message text that is written in the job log when a
message is logged according to the logging level and logging severity.
|
LOG_CL_PROGRAM_COMMANDS | VARCHAR(4) | Specifies whether or not commands are logged for CL programs that
are run.
|
JOB_LOG_OUTPUT | VARCHAR(10) | Specifies how the job log will be produced when the job
completes.
|
MAXIMUM_JOB_MESSAGE_QUEUE_SIZE | INTEGER | The maximum size, in megabytes, that the job message queue can become. The range is 2 to 64. |
JOB_MESSAGE_QUEUE_FULL_ACTION | VARCHAR(8) | The action to take when the message queue is full.
|
INQUIRY_MESSAGE_REPLY | VARCHAR(8) | Specifies how the job answers inquiry messages.
|
HOLD_ON_JOB_QUEUE | VARCHAR(4) | Whether this job is on the job queue with a status of held.
|
BREAK_MESSAGE | VARCHAR(10) | Specifies how this job handles break messages.
Contains the null value if the break message for the job has not been set. |
STATUS_MESSAGE | VARCHAR(10) | Specifies whether status messages are displayed for this job.
Contains the null value if the status message for the job has not been set. |
DDM_CONVERSATION | VARCHAR(5) | Specifies whether connections using distributed data management
(DDM) protocols remain active when they are not being used. The connections include APPC
conversations, active TCP/IP connections or Opti-Connect connections.
Contains the null value if the DDM conversation for the job has not been set. |
JOB_SCHEDULED_TIME | TIMESTAMP(0) | The timestamp for when the job is scheduled to become
active. Contains the null value if this is not a scheduled job. |
JOB_DATE | VARCHAR(10) | The date that is assigned to the job, in *ISO format. The job
date remains the same for the duration of the job unless it is changed by the user. Can also contain
the following special value:
Contains the null value if no date has been assigned to the job. |
DATE_FORMAT | CHAR(4) | The date format used for this job.
Contains the null value if the date format for the job has not been set. |
DATE_SEPARATOR | CHAR(1) | The date separator used for this job. Contains the null value if the date separator for the job has not been set. |
TIME_SEPARATOR | CHAR(1) | The time separator used for this job. Contains the null value if the time separator for the job has not been set. |
JOB_SWITCHES | CHAR(8) | The current setting of the job switches used by this job. |
ALLOW_WRKSBMJOB | VARCHAR(4) | Specifies whether the job being submitted is allowed to be shown
on the Work with Submitted Jobs panel.
|
QUALIFIED_SUBMITTER_JOB_NAME | VARCHAR(28) | The qualified job name of the submitter's job. |
SUBMITTER_JOB_NAME | VARCHAR(10) | The job name of the submitter's job. |
SUBMITTER_JOB_USER | VARCHAR(10) | The user name of the submitter's job. |
SUBMITTER_JOB_NUMBER | VARCHAR(6) | The number of the submitter's job. |
JOBEND_MESSAGE_QUEUE_LIBRARY | VARCHAR(10) | The name of the library containing JOBEND_MESSAGE_QUEUE.
Contains the null value if JOBEND_MESSAGE_QUEUE contains a special value. |
JOBEND_MESSAGE_QUEUE | VARCHAR(10) | The message queue where the completion message is sent when the
submitted job has completed running. Can contain the following special value:
|
TIME_SLICE | INTEGER | The maximum amount of processor time, in milliseconds, given to
each thread in this job before other threads in this job and in other jobs are given the opportunity
to run. The time slice establishes the amount of time needed by a thread in this job to accomplish a
meaningful amount of processing. At the end of the time slice, the thread might be put in an
inactive state so that other threads can become active in the storage pool. Values range from 8
through 9999999. Contains the null value if a time slice value for the job has not been set. |
PURGE_ALLOWED | VARCHAR(4) | Specifies whether the job is eligible to be moved out of main
storage and put into auxiliary storage at the end of a time slice or when entering a long wait (such
as waiting for a work station user's response).
Contains the null value if the purge setting for the job has not been set. |
DEFAULT_WAIT | INTEGER | The default maximum time, in seconds, that a thread in the job
waits for a system instruction, such as a LOCK machine interface (MI) instruction, to acquire a
resource. Contains the null value if a default wait time for the job has not been set. |
PRINT_KEY_FORMAT | VARCHAR(10) | Specifies whether border and header information is provided when
the Print key is pressed.
Contains the null value if the print key format for the job has not been set. |
SORT_SEQUENCE_LIBRARY | VARCHAR(10) | The name or the library that contains the sort sequence table.
Contains the null value when SORT_SEQUENCE is a special value. |
SORT_SEQUENCE | VARCHAR(10) | The name of the sort sequence table associated with this job. Can
contain the following special values:
|
LANGUAGE_ID | CHAR(3) | The language identifier associated with this job. |
COUNTRY_ID | CHAR(2) | The country or region identifier associated with this job. |
CCSID | INTEGER | The coded character set identifier (CCSID) used for this job. |
COPY_ENVIRONMENT_VARIABLES | VARCHAR(4) | Specifies whether the environment variables from the submitting
job are copied to the new job.
|
ALLOW_MULTIPLE_THREADS | VARCHAR(4) | Indicates whether this job allows multiple user threads. This
attribute does not prevent the operating system from creating system threads in the job.
|
DECIMAL_FORMAT | VARCHAR(6) | The decimal format used for this job.
Contains the null value if the decimal format for the job has not been set. |
CHARACTER_IDENTIFIER_CONTROL | VARCHAR(9) | The character identifier control for the job. This attribute
controls the type of CCSID conversion that occurs for display files, printer files, and panel
groups. The *CHRIDCTL special value must be specified on the CHRID command parameter on the create,
change, or override command for display files, printer files, and panel groups before this attribute
will be used.
Contains the null value if the character identifier control for the job has not been set. |
SPOOLED_FILE_ACTION | VARCHAR(7) | Specifies whether spooled files are accessed through job
interfaces after the job has completed is normal activity.
|
MAXIMUM_PROCESSING_TIME_ALLOWED | INTEGER | The maximum processing unit time, in milliseconds, that the job
can use. If the job consists of multiple routing steps, this is the maximum processing unit time
that the current routing step can use. If the maximum time is exceeded, the job is held. Contains the null value if the maximum processing unit time for the job has not been set. |
MAXIMUM_TEMPORARY_STORAGE_ALLOWED | INTEGER | The maximum amount of auxiliary storage, in megabytes, that the
job can use. If the job consists of multiple routing steps, this is the maximum temporary storage
that the routing step can use. This temporary storage is used for storage required by the program
itself and by implicitly created internal system objects used to support the routing step. (It does
not include storage for objects in the QTEMP library.) If the maximum temporary storage is exceeded,
the job is held. This does not apply to the use of permanent storage, which is controlled through
the user profile. Contains the null value if the maximum auxiliary storage for the job has not been set. |
PROCESSOR_RESOURCES_PRIORITY | VARCHAR(10) | If simultaneous multithreading (SMT) is enabled for the system,
the relative importance of the job when it is dispatched compared to other jobs that are dispatched.
Contains the null value if the processor resources priority for the job has not been set. |
ROUTING_STEP | INTEGER | A unique number. When TFRJOB is performed for a tracked job, a higher number is generated for a new job record. |
INTERNAL_JOB_IDENTIFIER | BINARY(16) | The internal job identifier. |
Example
- Show all entries in the job queues tracking table for jobs that have not completed for job queue
MYJOBQ in library JQLIB.
SELECT * FROM TABLE(QSYS2.TRACKED_JOB_INFO(JOB_QUEUE_LIBRARY_FILTER => 'JQLIB', JOB_QUEUE_FILTER => 'MYJOBQ')) WHERE JOB_END_TIME IS NULL;
![End of change](./deltaend.gif)