![Start of change](./delta.gif)
JOB_QUEUE_ENTRIES view
The JOB_QUEUE_ENTRIES view returns one row for each entry in a job queue.
Authorization: See Note below.
The following table describes the columns in the view. The system name is JOBQ_ENT. The schema is SYSTOOLS.
Column Name | System Column Name | Data type | Description |
---|---|---|---|
JOB_QUEUE_LIBRARY | JOBQ_LIB | VARCHAR(10) | The name of the library containing the job queue. |
JOB_QUEUE_NAME | JOBQ | VARCHAR(10) | The name of the job queue that the job is currently on. |
JOB_QUEUE_STATUS | STATUS | VARCHAR(9) | The status of this job on the job queue.
|
JOB_NAME | JOB_NAME | VARCHAR(28) | The qualified job name. |
JOB_NAME_SHORT | JOB_NAME_S | VARCHAR(10) | The name of the job. |
JOB_USER | JOB_USER | VARCHAR(10) | The user profile that started the job. |
JOB_NUMBER | JOB_NUMBER | VARCHAR(6) | The job number of the job. |
JOB_TYPE | JOB_TYPE | VARCHAR(3) | The type of job.
|
JOB_TYPE_ENHANCED | JOBT_ENH | VARCHAR(28) | The combined job type and job subtype values.
|
JOB_DATE | 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:
|
JOB_DESCRIPTION_LIBRARY | JOBDLIB | VARCHAR(10) Nullable
|
The name of the library containing the job description. Contains the null value if JOB_DESCRIPTION is null. |
JOB_DESCRIPTION | JOBD | VARCHAR(10) Nullable
|
The name of the job description used for this job. Contains the null value if the job has no job description. |
JOB_ACCOUNTING_CODE | ACGCDE | VARCHAR(15) Nullable
|
An identifier assigned to the job by the system to collect resource use
information for the job when job accounting is active. Contains the null value if the job has no accounting code. |
SUBMITTER_JOB_NAME | SBMJOBNAME | VARCHAR(28) Nullable
|
The qualified job name of the submitter's job. Contains the null value if the job has no submitter. |
SUBMITTER_MESSAGE_QUEUE_LIBRARY | SBMMSGQLIB | VARCHAR(10) Nullable
|
The name of the library containing the message queue. Contains the null value if the job has no submitter. |
SUBMITTER_MESSAGE_QUEUE | SBMMSGQ | VARCHAR(10) Nullable
|
The name of the message queue where the system sends a completion message when a
batch job ends. Contains the null value if the job has no submitter. |
SERVER_TYPE | SERVERTYPE | VARCHAR(30) Nullable
|
The type of server represented by the job. See Server table for a list of server type
values. Contains the null value if the job is not part of a server. |
JOB_ENTERED_SYSTEM_TIME | ENTER_TIME | TIMESTAMP(0) | The timestamp for when the job was placed on the system. |
JOB_SCHEDULED_TIME | JOB_SCHEDT | TIMESTAMP(0) Nullable
|
The timestamp for when the job is scheduled to become active. Contains the null value if this is not a scheduled job. |
JOB_END_SEVERITY | JOB_ENDSEV | INTEGER | The message severity level of escape messages that can cause a batch job to end. The batch job ends when a request in the batch input stream sends an escape message, whose severity is equal to or greater than this value, to the request processing program. |
JOB_QUEUE_PRIORITY | JOBQ_PRI | 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. |
JOB_QUEUE_TIME | JOBQ_TIME | TIMESTAMP(0) | The timestamp when the job was put on the job queue. |
JOB_MESSAGE_QUEUE_MAXIMUM_SIZE | MSGQ_MAX | INTEGER | The maximum size, in megabytes, that the job message queue can become. The range is 2 to 64. |
JOB_MESSAGE_QUEUE_FULL_ACTION | MSGQ_FULL | VARCHAR(8) | The action to take when the message queue is full.
|
ALLOW_MULTIPLE_THREADS | ALWMLTTHD | VARCHAR(3) | Indicates whether this job allows multiple user threads. This attribute does not
prevent the operating system from creating system threads in the job.
|
DEFAULT_WAIT | DFT_WAIT | INTEGER Nullable
|
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 there is no maximum or if a value has not been set for the job. |
MAXIMUM_PROCESSING_TIME_
ALLOWED |
MAX_TIME | INTEGER Nullable
|
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 no maximum amount of processing unit time has been defined. |
MAXIMUM_TEMPORARY_STORAGE_
ALLOWED |
MAX_STG | INTEGER Nullable
|
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 no maximum amount of temporary storage has been defined. |
TIME_SLICE | TIME_SLICE | INTEGER Nullable
|
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 value has not been set for the job. |
JOB_SWITCHES | SWITCHES | CHAR(8) Nullable
|
The current setting of the job switches used by this job. Contains the null value no job switches are set. |
ROUTING_DATA | RTGDTA | VARCHAR(80) Nullable
|
The routing data that is used to determine the routing entry that identifies the
program to start for the routing step. Contains the null value if there is no routing data for this job. |
CCSID | CCSID | INTEGER Nullable
|
The coded character set identifier (CCSID) used for this job. Contains the null value if no CCSID is defined for this job. |
CHARACTER_IDENTIFIER_CONTROL | CHRIDCTL | 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.
|
SORT_SEQUENCE_LIBRARY | SRTSEQ_LIB | VARCHAR(10) Nullable
|
The name or the library that contains the sort sequence table. Contains the null value if no sort sequence table is defined for this job or if SORT_SEQUENCE_NAME is a special value. |
SORT_SEQUENCE_NAME | SRTSEQ | VARCHAR(10) Nullable
|
The name of the sort sequence table associated with this job. Contains the null value if no sort sequence table is defined for this job. |
LANGUAGE_ID | LANGID | CHAR(3) | The language identifier associated with this job. |
COUNTRY_ID | COUNTRY_ID | CHAR(2) | The country or region identifier associated with this job. |
DATE_FORMAT | DATFMT | CHAR(4) | The date format used for this job.
|
DATE_SEPARATOR | DATSEP | CHAR(1) | The date separator used for this job. |
TIME_SEPARATOR | TIMSEP | CHAR(1) | The time separator used for this job. |
DECIMAL_FORMAT | DECFMT | VARCHAR(6) | The decimal format used for this job.
|
TIME_ZONE_DESCRIPTION_NAME | TIME_ZONE | VARCHAR(10) | The name of the time zone description that is used to calculate local job time. |
MESSAGE_LOGGING_LEVEL | LOG_LEVEL | INTEGER | The type of information that is logged.
|
MESSAGE_LOGGING_SEVERITY | LOG_SEV | 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 | LOG_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 | LOG_CL | VARCHAR(4) | Specifies whether or not commands are logged for CL programs that are run.
|
STATUS_MESSAGE | STATUS_MSG | VARCHAR(7) | Specifies whether status messages are displayed for this job.
|
INQUIRY_MESSAGE_REPLY | INQ_REPLY | VARCHAR(8) | Specifies how the job answers inquiry messages.
|
BREAK_MESSAGE | BREAK_MSG | VARCHAR(7) | Specifies how this job handles break messages.
|
JOB_LOG_OUTPUT | JOBLOG_OUT | VARCHAR(10) | Specifies how the job log will be produced when the job completes.
|
OUTPUT_QUEUE_PRIORITY | OUTQ_PRI | INTEGER | The output priority for spooled output files that this job produces. The highest priority is 0, and the lowest is 9. |
OUTPUT_QUEUE_LIBRARY | OUTQLIB | VARCHAR(10) | The name of the library that contains the default output queue. |
OUTPUT_QUEUE_NAME | OUTQ | VARCHAR(10) | The name of the default output queue that is used for spooled output produced by this job and the name of the library that contains the output queue. The default output queue is only for spooled printer files that specify *JOB for the output queue. |
SPOOLED_FILE_ACTION | SPOOL_ACT | VARCHAR(7) | Specifies whether spooled files are accessed through job interfaces after the
job has completed is normal activity.
|
PRINTER_DEVICE_NAME | DEV_NAME | VARCHAR(10) | The printer device used for printing output from this job. |
PRINT_KEY_FORMAT | PRINT_KEY | VARCHAR(7) | Specifies whether border and header information is provided when the Print key
is pressed.
|
PRINT_TEXT | PRINT_TEXT | VARCHAR(30) Nullable
|
The line of text that is printed at the bottom of each page of printed output
for the job. Contains the null value if there is no text defined to print at the bottom of each page. |
DDM_CONVERSATION | DDM_CONV | 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.
|
MODE_NAME | MODE_NAME | VARCHAR(8) Nullable
|
The mode name of the advanced program-to-program communications device that
started the job. The following special value may be returned:
Contains the null value if the job is not using advanced program-to-program communications (APPC). |
UNIT_OF_WORK_ID | UWID | CHAR(24) Nullable
|
The unit of work ID is used to track jobs across multiple systems. Contains the null value if the job is not associated with a source or target system using advanced program-to-program communications (APPC). |
INTERNAL_JOB_ID | JOB_ID | BINARY(16) | The internal job identifier. |
Note
This function is provided in the SYSTOOLS schema as an example of how to create a view based on information from a table function. Similar to other Db2® for i provided tools within SYSTOOLS, the SQL source can be extracted and used as a model for building similar helper functions, or to create a customized version within a user-specified schema.
Services provided in SYSTOOLS have authorization requirements that are determined by the interfaces used to implement the service. To understand the authority requirements, extract the SQL for the service and examine the implementation.
Example
SELECT * FROM SYSTOOLS.JOB_QUEUE_ENTRIES
WHERE JOB_QUEUE_LIBRARY = 'APP1' AND JOB_QUEUE_NAME = 'BATCHJQ';
![End of change](./deltaend.gif)