JOB_INFO table function

The JOB_INFO table function returns one row for each job meeting the selection criteria.

It returns information similar to what is returned by the Work with User Jobs (WRKUSRJOB), Work with Subsystem Jobs (WRKSBSJOB), and Work with Submitted Jobs (WRKSBMJOB) CL commands and the List Job (QUSLJOB) API.

Authorization: None required to see information for jobs where the caller's user profile is the same as the job user identity of the job for which the information is being returned. Otherwise, the caller must have *JOBCTL special authority.

Read syntax diagramSkip visual syntax diagramJOB_INFO(JOB_STATUS_FILTER => job-status-filter,JOB_TYPE_FILTER => job-type-filter ,JOB_SUBSYSTEM_FILTER => job-subsystem-filter ,JOB_USER_FILTER => job-user-filter ,JOB_SUBMITTER_FILTER => job-submitter-filter )
The schema is QSYS2.
job-status-filter
A character or graphic string expression that specifies the value to use as the job status filtering criteria. The string must be one of the following special values:
*ALL
Jobs of any status including jobs on job queues, active jobs, and jobs on an output queue.
*ACTIVE
Jobs that are active. You can use the QSYS2.ACTIVE_JOB_INFO table function to get additional details for these jobs.
*JOBQ
Jobs that are not active because they are waiting on a job queue.
*OUTQ
Jobs that have completed execution and have output on an output queue.

If this parameter is not provided, a value of *ALL is used.

job-type-filter
A character or graphic string expression that specifies the value to use as the job type filtering criteria. The string must be one of the following special values:
*ALL
All types of user jobs, including interactive jobs and batch jobs.
*BATCH
Only batch user jobs, including prestart jobs, batch immediate jobs, and autostart jobs.
*INTERACT
Only interactive user jobs.

If this parameter is not provided, a value of *ALL is used.

job-subsystem-filter
A character or graphic string expression that specifies the subsystem value to use as the job subsystem filtering criteria. The string can be a subsystem name or the following value:
*ALL
All jobs in all subsystems, including jobs that are on job queues and on output queues.

If a subsystem name is provided, only active jobs are found.

If this parameter is not provided, a value of *ALL is used.

job-user-filter
The USER special register or a character or graphic string expression that specifies the user profile name to use as the job user filtering criteria.
The string can be a user name or one of the following special values:
*ALL
All jobs being processed under all user names.
*USER
The user part of the qualified job name.
The USER special register is specified as a non-string value. It represents the current user of the job invoking the function.
If this parameter is not provided, the value of the USER special register is used.
job-submitter-filter
A character or graphic string expression that specifies the type of submitted jobs to return. The string must be one of the following values:
*ALL
All submitted jobs.
*JOB
Jobs that were submitted from the same job that is invoking this function.
*USER
Jobs that were submitted from a job having the same user profile as the job invoking this function.
*WRKSTN
Jobs that were submitted from the same work station as the job invoking this function.

If this parameter is not provided, a value of *ALL is used.

Restrictions:

  • Only one of these filters can have a value other than *ALL: job-subsystem-filter and job-submitter-filter.
  • If a value other than *ALL is specified for job-submitter-filter, you must specify *ALL for job-user-filter.

Notes:

  • Jobs submitted with *NO specified for the Allow display by WRKSBMJOB (DSPSBMJOB) parameter of the SBMJOB command are not returned by this table function.
For each of the WRKSBMJOB, WRKSBSJOB, and WRKUSRJOB CL commands shown below, the corresponding invocation of JOB_INFO will return the same list of jobs. Note that to get exact equivalence, predicates must be added to some queries to achieve equivalent results:
  • For equivalence with WRKUSRJOB, a query must always include the predicate WHERE JOB_TYPE NOT IN ('SBS','SYS','RDR','WTR')
  • For equivalence with WRKSBSJOB SBS(*OUTQ) or WRKSBSJOB SBS(*ALL), a query must always include the predicate WHERE JOB_TYPE NOT IN ('SBS','SYS')
Table 1. Equivalent CL command and JOB_INFO invocations
CL Command CL Parameters JOB_INFO invocation
WRKSBMJOB
SBMFROM(*USER)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                       JOB_SUBMITTER_FILTER => '*USER',
                       JOB_USER_FILTER => '*ALL'
                    )) X
SBMFROM(*WRKSTN)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                       JOB_SUBMITTER_FILTER => '*WRKSTN',
                       JOB_USER_FILTER => '*ALL'
                    )) X
SBMFROM(*JOB)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                       JOB_SUBMITTER_FILTER => '*JOB',
                       JOB_USER_FILTER => '*ALL'
                    )) X
WRKSBSJOB
SBS(QBATCH)
USER(*ALL)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                       JOB_SUBSYSTEM_FILTER => 'QBATCH', 
                       JOB_USER_FILTER => '*ALL'
                    )) X
SBS(*JOBQ)
USER(*ALL)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                       JOB_STATUS_FILTER => '*JOBQ', 
                       JOB_USER_FILTER => '*ALL'
                    )) X
SBS(*OUTQ)
USER(JOEUSER)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                       JOB_STATUS_FILTER => '*OUTQ', 
                       JOB_USER_FILTER => 'JOEUSER'
                    )) X
WHERE JOB_TYPE NOT IN ('SBS','SYS')
SBS(*ALL)
USER(*ALL)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                       JOB_STATUS_FILTER => '*ALL', 
                       JOB_USER_FILTER => '*ALL'
                    )) X
WHERE JOB_TYPE NOT IN ('SBS','SYS') 
WRKUSRJOB
USER(*)
STATUS(*ALL)
JOBTYPE(*ALL)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                    )) X
WHERE JOB_TYPE NOT IN ('SBS','SYS','RDR','WTR')
USER(*)
STATUS(*ALL)
JOBTYPE(*INTERACT)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                       JOB_TYPE_FILTER => '*INTERACT' 
                    )) X
WHERE JOB_TYPE NOT IN ('SBS','SYS','RDR','WTR')
USER(JOEUSER)
STATUS(*ACTIVE)
JOBTYPE(*ALL)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                       JOB_USER_FILTER => 'JOEUSER',
                       JOB_STATUS_FILTER => '*ACTIVE' 
                    )) X
WHERE JOB_TYPE NOT IN ('SBS','SYS','RDR','WTR')
USER(*)
STATUS(*OUTQ)
JOBTYPE(*ALL)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                       JOB_STATUS_FILTER => '*OUTQ' 
                    )) X
WHERE JOB_TYPE NOT IN ('SBS','SYS','RDR','WTR')
USER(*ALL)
STATUS(*JOBQ)
JOBTYPE(*BATCH)
SELECT * FROM TABLE(QSYS2.JOB_INFO(
                       JOB_USER_FILTER => '*ALL',
                       JOB_STATUS_FILTER => *JOBQ',
                       JOB_TYPE_FILTER =>'*BATCH' 
                    )) X
WHERE JOB_TYPE NOT IN ('SBS','SYS','RDR','WTR')

The result of the function is a table containing multiple rows with the format shown in the following table. All the columns are nullable.

Table 2. JOB_INFO table function
Column Name Data Type Description
JOB_NAME VARCHAR(28) The qualified job name.
Start of changeJOB_NAME_SHORTEnd of change Start of changeVARCHAR(10)End of change Start of changeThe name of the job.End of change
Start of changeJOB_USEREnd of change Start of changeVARCHAR(10)End of change Start of changeThe user profile that started the job.End of change
Start of changeJOB_NUMBEREnd of change Start of changeVARCHAR(6)End of change Start of changeThe job number of the job.End of change
JOB_INFORMATION VARCHAR(12) Indicates whether information is available for the job.
NO
The information is not available because the job was not accessible.
YES
The information is available.

When this value is NO, all columns other than JOB_NAME return the null value.

JOB_STATUS VARCHAR(6) The status of the job.
ACTIVE
The job has started, and it can use system resources (processing unit, main storage, and so on). This does not guarantee that the job is currently running, however. For example, an active job may be in one of the following states where it is not in a position to use system resources:
  • The Hold Job (HLDJOB) command holds the job; the Release Job (RLSJOB) command allows the job to run again.
  • The Transfer Group Job (TFRGRPJOB) or Transfer Secondary Job (TFRSECJOB) command suspends the job. When control returns to the job, the job can run again.
  • The job is disconnected using the Disconnect Job (DSCJOB) command. When the interactive user signs back on, thereby connecting back into the job, the job can run again.
  • The job is waiting for any reason. For example, when the job receives the reply for an inquiry message, the job can start running again.
JOBQ
The job is currently on a job queue. The job possibly was previously active and was placed back on the job queue because of the Transfer Job (TFRJOB) or Transfer Batch Job (TFRBCHJOB) command, or the job was never active because it was just submitted.
OUTQ
The job has completed running and has spooled output that has not yet printed or the job's job log has not yet been written.
JOB_TYPE VARCHAR(3) The type of job.
ASJ
Autostart
BCH
Batch
BCI
Batch Immediate
EVK
Started by a procedure start request
INT
Interactive
M36
Advanced 36 server job
MRT
Multiple requester terminal
PDJ
Print driver job
PJ
Prestart job
RDR
Spool reader
SBS
Subsystem monitor
SYS
System
WTR
Spool writer
JOB_TYPE_ENHANCED VARCHAR(28) The combined job type and job subtype values.
ALTERNATE_SPOOL_USER
Batch - alternate spool user
AUTOSTART
Autostart job
BATCH
Batch job
BATCH_IMMEDIATE
Batch immediate job
BATCH_MRT
Batch - System/36 multiple requester terminal (MRT) job
COMM_PROCEDURE_START_REQUEST
Communications job - procedure start request job
INTERACTIVE
Interactive job
INTERACTIVE_GROUP
Interactive job - Part of group
INTERACTIVE_SYSREQ
Interactive job - Part of system request pair
INTERACTIVE_SYSREQ_AND_GROUP
Interactive job - Part of system request pair and part of a group
PRESTART
Prestart job
PRESTART_BATCH
Prestart batch job
PRESTART_COMM
Prestart communications job
READER
Reader job
SUBSYSTEM
Subsystem job
SYSTEM
System job (all system jobs including SCPF)
WRITER
Writer job (including both spool writers and print drivers)
JOB_SUBSYSTEM VARCHAR(10) The name of the subsystem for the job.

Contains the null value if JOB_TYPE is SYS, JOB_STATUS is JOBQ or OUTQ, or if the job has no subsystem.

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:
SYSVAL
This job will use the system date.

Contains the null value if JOB_STATUS is OUTQ.

JOB_DESCRIPTION_LIBRARY VARCHAR(10) The name of the library containing the job description.

Contains the null value if JOB_DESCRIPTION is null.

JOB_DESCRIPTION VARCHAR(10) The name of the job description used for this job.

Contains the null value if the job has no job description.

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.

Contains the null value if the job has no accounting code.

SUBMITTER_JOB_NAME VARCHAR(28) The qualified job name of the submitter's job.

Contains the null value if the job has no submitter.

SUBMITTER_MESSAGE_QUEUE_LIBRARY VARCHAR(10) The name of the library containing the message queue.

Contains the null value if the job has no submitter.

SUBMITTER_MESSAGE_QUEUE VARCHAR(10) 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 VARCHAR(30) 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 TIMESTAMP(0) The timestamp for when the job was placed on the system.
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_ACTIVE_TIME TIMESTAMP(0) The time the job began to run on the system.

Contains the null value if the job did not become active.

JOB_END_TIME TIMESTAMP(0) The timestamp for when the job completed running on the system.

Contains the null value if the job has not ended.

JOB_END_SEVERITY SMALLINT 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.
COMPLETION_STATUS VARCHAR(8) The completion status of the job.
ABNORMAL
The job completed abnormally.
NORMAL
The job completed normally.

Contains the null value if this the job has not completed.

JOB_END_REASON VARCHAR(60) The most recent action that caused the job to end. Contains one of the following values:
  • JOB ENDED DUE TO A DEVICE ERROR
  • JOB ENDED DUE TO A SIGNAL
  • JOB ENDED DUE TO AN UNHANDLED ERROR
  • JOB ENDED DUE TO THE CPU LIMIT BEING EXCEEDED
  • JOB ENDED DUE TO THE DISCONNECT TIME INTERVAL BEING EXCEEDED
  • JOB ENDED DUE TO THE INACTIVITY TIME INTERVAL BEING EXCEEDED
  • JOB ENDED DUE TO THE MESSAGE SEVERITY LEVEL BEING EXCEEDED
  • JOB ENDED DUE TO THE STORAGE LIMIT BEING EXCEEDED
  • JOB ENDED WHILE IT WAS STILL ON A JOB QUEUE
  • JOB ENDING ABNORMALLY
  • JOB ENDING IMMEDIATELY
  • JOB ENDING IN NORMAL MANNER
  • JOB ENDING NORMALLY AFTER A CONTROLLED END WAS REQUESTED
  • SYSTEM ENDED ABNORMALLY

Contains the null value if job is not currently ending.

JOB_QUEUE_LIBRARY VARCHAR(10) The name of the library containing the job queue.

Contains the null value if JOB_STATUS is OUTQ or if job is not on a job queue and the job is not a batch job that was started from a job queue.

JOB_QUEUE_NAME VARCHAR(10) The name of the job queue that the job is currently on, or that the job was on if it is currently active.

Contains the null value if JOB_STATUS is OUTQ or if job is not on a job queue and the job is not a batch job that was started from a job queue.

JOB_QUEUE_STATUS VARCHAR(9) The status of this job on the job queue.
HELD
This job is being held on the job queue.
RELEASED
This job is ready to be selected.
SCHEDULED
This job will run as scheduled.

Contains the null value if the job is not on a job queue.

JOB_QUEUE_PRIORITY SMALLINT 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.

Contains the null value if JOB_STATUS is not JOBQ.

JOB_QUEUE_TIME TIMESTAMP(0) The timestamp when the job was put on the job queue.

Contains the null value if this the job is not on a job queue.

JOB_MESSAGE_QUEUE_MAXIMUM_SIZE SMALLINT The maximum size, in megabytes, that the job message queue can become. The range is 2 to 64.

Contains the null value if JOB_QUEUE_NAME is null.

JOB_MESSAGE_QUEUE_FULL_ACTION VARCHAR(8) The action to take when the message queue is full.
*NOWRAP
When the job message queue is full, do not wrap. This action causes the job to end.
*PRTWRAP
When the job message queue is full, wrap the message queue and print the messages that are being overlaid because of the wrapping.
*WRAP
When the job message queue is full, wrap to the beginning and start filling again.

Contains the null value if JOB_QUEUE_NAME is null.

ALLOW_MULTIPLE_THREADS 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.
NO
This job does not allow multiple user threads.
YES
This job allows multiple user threads.
PEAK_TEMPORARY_STORAGE INTEGER The maximum amount of auxiliary storage, in megabytes, that the job has used.

Contains the null value if JOB_STATUS is OUTQ or for a job on a job queue if a value has not been set for the job.

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 there is no maximum, if JOB_STATUS is OUTQ, or for a job on a job queue if a value has not been set for the job.

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 JOB_STATUS is OUTQ or if no maximum amount of processing unit time has been defined.

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 JOB_STATUS is OUTQ or if no maximum amount of temporary storage has been defined.

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 JOB_STATUS is OUTQ or for a job on a job queue if a value has not been set for the job.

JOB_SWITCHES CHAR(8) The current setting of the job switches used by this job.

Contains the null value no job switches are set.

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.

Contains the null value if there is no routing data for this job.

CCSID INTEGER 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 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.
*DEVD
The *DEVD special value performs the same function as on the CHRID command parameter for display files, printer files, and panel groups.
*JOBCCSID
The *JOBCCSID special value performs the same function as on the CHRID command parameter for display files, printer files, and panel groups.
SORT_SEQUENCE_LIBRARY VARCHAR(10) 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 VARCHAR(10) 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 CHAR(3) The language identifier associated with this job.
COUNTRY_ID CHAR(2) The country or region identifier associated with this job.
DATE_FORMAT CHAR(4) The date format used for this job.
*DMY
Day, month, year format.
*JUL
Julian format (year and day).
*MDY
Month, day, year format.
*YMD
Year, month, day format.
DATE_SEPARATOR CHAR(1) The date separator used for this job.
TIME_SEPARATOR CHAR(1) The time separator used for this job.
DECIMAL_FORMAT VARCHAR(6) The decimal format used for this job.
*BLANK
Uses a period for a decimal point, a comma for a 3-digit grouping character, and zero-suppress to the left of the decimal point.
J
Uses a comma for a decimal point and a period for a 3-digit grouping character. The zero-suppression character is in the second position (rather than the first) to the left of the decimal notation. Balances with zero values to the left of the comma are written with one leading zero (0,04). The J entry also overrides any edit codes that might suppress the leading zero.
I
Uses a comma for a decimal point, a period for a 3-digit grouping character, and zero-suppress to the left of the decimal point.
TIME_ZONE_DESCRIPTION_NAME VARCHAR(10) The name of the time zone description that is used to calculate local job time.
MESSAGE_LOGGING_LEVEL SMALLINT The type of information that is logged.
0
No messages are logged.
1
All messages sent to the job's external message queue with a severity greater than or equal to the message logging severity are logged. This includes the indication of job start, job end and job completion status.
2
The following information is logged:
  • Level 1 information
  • Request messages that result in a high-level message with a severity code greater than or equal to the logging severity cause the request message and all associated messages to be logged.

    Note: A high-level message is one that is sent to the program message queue of the program that receives the request message. For example, QCMD is an IBM®-supplied request processing program that receives request messages.

3
The following information is logged:
  • Level 1 and 2 information
  • All request messages
  • Commands run by a CL program are logged if it is allowed by the logging of CL programs job attribute and the log attribute of the CL program.
4
The following information is logged:
  • All request messages and all messages with a severity greater than or equal to the message logging severity, including trace messages.
  • Commands run by a CL program are logged if it is allowed by the logging of CL programs job attribute and the log attribute of the CL program.
MESSAGE_LOGGING_SEVERITY SMALLINT 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.
*MSG
Only the message text is written to the job log.
*NOLIST
If the job ends normally, no job log is produced. If the job ends abnormally (the job end code is 20 or higher), a job log is produced. The messages that appear in the job log contain both the message text and the message help.
*SECLVL
Both the message text and the message help (cause and recovery) of the error message are written to the job log.
LOG_CL_PROGRAM_COMMANDS VARCHAR(4) Specifies whether or not commands are logged for CL programs that are run.
*NO
Commands are not logged.
*YES
Commands are logged.
STATUS_MESSAGE VARCHAR(7) Specifies whether status messages are displayed for this job.
*NONE
This job does not display status messages.
*NORMAL
This job displays status messages.
INQUIRY_MESSAGE_REPLY VARCHAR(8) Specifies how the job answers inquiry messages.
*RQD
The job requires an answer for any inquiry messages that occur while this job is running.
*DFT
The system uses the default message reply to answer any inquiry messages issued while this job is running. The default reply is either defined in the message description or is the default system reply.
*SYSRPYL
The system reply list is checked to see if there is an entry for an inquiry message issued while this job is running. If a match occurs, the system uses the reply value for that entry. If no entry exists for that message, the system uses an inquiry message.
BREAK_MESSAGE VARCHAR(7) Specifies how this job handles break messages.
*HOLD
The message queue holds break messages until a user or program requests them. The work station user uses the Display Message (DSPMSG) command to display the messages; a program must issue a Receive Message (RCVMSG) command to receive a message and handle it.
*NORMAL
The message queue status determines break message handling.
*NOTIFY
The system notifies the job's message queue when a message arrives. For interactive jobs, the audible alarm sounds if there is one, and the message-waiting light comes on.
JOB_LOG_OUTPUT VARCHAR(10) Specifies how the job log will be produced when the job completes.
*JOBEND
The job log will be produced by the job itself. If the job cannot produce its own job log, the job log will be produced by a job log server. For example, a job does not produce its own job log when the system is processing a Power® Down System (PWRDWNSYS) command.
*JOBLOGSVR
The job log will be produced by a job log server. For more information about job log servers, refer to the Start Job Log Server (STRLOGSVR) command.
*PND
The job log will not be produced. The job log remains pending until removed.
JOB_LOG_PENDING VARCHAR(3) Specifies whether there is a job log that has not yet been written. The writing of the job log may become pending based on the value of the job log output job attribute when the job completes its activity.
NO
Job log is not pending.
YES
Job log is pending.
OUTPUT_QUEUE_PRIORITY SMALLINT The output priority for spooled output files that this job produces. The highest priority is 0, and the lowest is 9.
OUTPUT_QUEUE_LIBRARY VARCHAR(10) The name of the library that contains the default output queue.
OUTPUT_QUEUE_NAME 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 VARCHAR(7) Specifies whether spooled files are accessed through job interfaces after the job has completed is normal activity.
*DETACH
The spooled files are detached from the job when the job completes its activity.
*KEEP
When the job completes its activity, as long as at least one spooled file for the job exists in the system auxiliary storage pool (ASP 1) or in a basic user ASP (ASPs 2-32), the spooled files are kept with the job and the status of the job is updated to indicate that the job has completed. If all remaining spooled files for the job are in independent ASPs (ASPs 33-255), the spooled files will be detached from the job and the job will be removed from the system.
PRINTER_DEVICE_NAME VARCHAR(10) The printer device used for printing output from this job.
PRINT_KEY_FORMAT VARCHAR(7) Specifies whether border and header information is provided when the Print key is pressed.
*NONE
The border and header information is not included with output from the Print key.
*PRTBDR
The border information is included with output from the Print key.
*PRTHDR
The header information is included with output from the Print key.
*PRTALL
The border and header information is included with output from the Print key.
PRINT_TEXT VARCHAR(30) 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.

DEVICE_NAME VARCHAR(10) The name of the device as identified to the system. For an interactive job it is the device where the job started.

Contains the null value if this is not an interactive job.

DEVICE_RECOVERY_ACTION VARCHAR(13) The action taken for interactive jobs when an I/O error occurs for the job's requesting program device.
*DSCENDRQS
Disconnects the job when an I/O error occurs. When the job reconnects, the system sends the End Request (ENDRQS) command to return control to the previous request level.
*DSCMSG
Disconnects the job when an I/O error occurs. When the job reconnects, the system sends an error message to the application program, indicating the job has reconnected and that the work station device has recovered.
*ENDJOB
Ends the job when an I/O error occurs. A message is sent to the job's log and to the history log (QHST) indicating the job ended because of a device error.
*ENDJOBNOLIST
Ends the job when an I/O error occurs. There is no job log produced for the job. The system sends a message to the QHST log indicating the job ended because of a device error.
*MSG
Signals the I/O error message to the application and lets the application program perform error recovery.

Contains the null value if this is not an interactive job.

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.
*DROP
The system ends a DDM connection when there are no users. Examples include when an application closes a DDM file, or when a DRDA application runs a SQL DISCONNECT statement.
*KEEP
The system keeps DDM connections active when there are no users, except for the following:
  • The routing step ends on the source system. The routing step ends when the job ends or when the job is rerouted to another routing step.
  • The Reclaim Distributed Data Management Conversation (RCLDDMCNV) command or the Reclaim Resources (RCLRSC) command runs.
  • A communications failure or an internal failure occurs.
  • A DRDA connection to an application server not running on the system ends.
MODE_NAME VARCHAR(8) The mode name of the advanced program-to-program communications device that started the job. The following special value may be returned:
*BLANK
The mode name is a blank name.

Contains the null value if the job is not using advanced program-to-program communications (APPC).

UNIT_OF_WORK_ID CHAR(24) 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 BINARY(16) The internal job identifier.

Examples

  • Find all interactive jobs.
    SELECT * FROM TABLE(QSYS2.JOB_INFO(JOB_TYPE_FILTER => '*INTERACT')) X;
  • Find jobs submitted by SCOTTF that have not been started.
    SELECT * FROM TABLE(QSYS2.JOB_INFO(JOB_USER_FILTER   => 'SCOTTF',
                                       JOB_STATUS_FILTER => '*JOBQ')) X;