Easy way to find all my IBM i Job Description (*JOBD) information

  • Home
  • /
  • Blog
  • /
  • Easy way to find all my IBM i Job Description (*JOBD) information

April 12, 2022

Easy way to find all my IBM i Job Description (*JOBD) information

By NickLitten

April 12, 2022

JOBD

What is an IBM i Job Description?

An IBM-i job description (JOBD) defines runtime information about the Job that is submitted using it. It’s been this way since the AS400 and iSeries machines of years gone by.

A JOBD contains information covering things like: Job queue to be used by the Job, scheduling priority, routing data, message queue severity, library list, printed output information and much more.

Historically I’ve used the IBM i *API “QWDRJOBD” which returns all the job description information, including the library list. Sadly writing API calls is notoriously tricky with assorted fixed values, as well as the variable length elements, and data structures being returned.

Luckily, there is now a much easier way to do it.

Finding all Job Description Details the Easy Way

Let’s use the JOB_DESCRIPTION_INFO SQL View

The JOB_DESCRIPTION_INFO view returns information about job descriptions.

Column NameSystem Column NameData TypeDescription
JOB_DESCRIPTION_LIBRARYJOBDLIBVARCHAR(10)The name of the library in which the job description resides.
JOB_DESCRIPTIONJOBDVARCHAR(10)The name of the job description about which information is being returned.
AUTHORIZATION_NAMEUSER_NAMEVARCHAR(10)The name of the user profile associated with this job description. Can contain the following special value: *RQD A user name is required to use the job description.
JOB_DATEJOB_DATEDATE
Nullable
The date that will be assigned to jobs using this job description when they are started.Contains the null value if this job will use the QDATE system value.
ACCOUNTING_CODEACGCDEVARCHAR(15)An identifier assigned to jobs that use this job description. This code is used to collect system resource use information. Can contain the following special value: *USRPRF The accounting code used for jobs using this job description is obtained from the job’s user profile.
ROUTING_DATARTGDTAVARCHAR(80)The routing data that is used with this job description to start jobs. Can contain one of the following special values: QCMDI The default routing data QCMDI is used by the IBM®-supplied interactive subsystem to route the job to the IBM-supplied control language processor QCMD in the QSYS library. *RQSDTA Up to the first 80 characters of the request data specified in the request data field are used as the routing data for the job.
REQUEST_DATARQSDTAVARCHAR(256)
Nullable
The request data that is placed as the last entry in the job’s message queue for jobs that use this job description. Can contain the following special value: *RTGDTA The data specified in the routing data parameter is placed as the last entry in the job’s message queue.Contains the null value if no request data is placed in the job’s message queue.
LIBRARY_LIST_COUNTLIBL_COUNTINTEGERThe number of libraries in the user portion of the initial library list.
LIBRARY_LISTLIBLVARCHAR(2750)
Nullable
The initial library list that is used for jobs that use this job description. Only the libraries in the user portion of the library list are included. The list is an array of 11 character entries. Each entry contains a ten character name followed by one blank. Can contain the following special value: *SYSVAL The jobs using this job description will use the library list specified by the QUSRLIBL system value.Contains the null value is there is no initial library list.
JOB_SWITCHESSWITCHESCHAR(8)The initial settings for a group of eight job switches used by jobs that use this job description. These switches can be set or tested in a program and used to control a program’s flow. The possible values are ‘0’ (off) and ‘1’ (on).
TEXT_DESCRIPTIONTEXTVARCHAR(50)
Nullable
The user text, if any, used to briefly describe the job description.Contains the null value is there is no descriptive text.
JOB_QUEUE_LIBRARYJOBQLIBVARCHAR(10)The library of the job queue into which batch jobs using this job description are placed.
JOB_QUEUEJOBQVARCHAR(10)The name of the job queue into which batch jobs using this job description are placed.
JOB_QUEUE_PRIORITYJOBQ_PRISMALLINTThe scheduling priority of each job that uses this job description. The highest priority is 1 and the lowest priority is 9.
HOLD_ON_JOB_QUEUEJOBQ_HOLDVARCHAR(4)Whether jobs using this job description are put on the job queue with a status of held. *NO Jobs using this job description are not put on the job queue as held. *YES Jobs using this job description are put on the job queue as held.
OUTPUT_QUEUE_LIBRARYOUTQLIBVARCHAR(10)
Nullable
The name of the library in which the output queue resides. Contains the null value if OUTPUT_QUEUE is a special value.
OUTPUT_QUEUEOUTQVARCHAR(10)The name of the default output queue that is used for spooled output produced by jobs that use this job description. Can contain one of the following special values: *DEV The output queue with the same name as the printer device for this job description is used. *USRPRF The output queue name for jobs using this job description is obtained from the user profile of the job at the time the job is started. *WRKSTN The output queue name is obtained from the device description from which this job is started.
OUTPUT_QUEUE_PRIORITYOUTQ_PRISMALLINTThe output priority for spooled files that are produced by jobs using this job description. The highest priority is 1, and the lowest priority is 9.
SPOOLED_FILE_ACTIONSPOOL_ACTVARCHAR(7)Specifies whether spooled files can be accessed through job interfaces once a job has completed its normal activity. *DETACH 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. *SYSVAL The jobs using this job description will take the spooled file action specified by the QSPLFACN system value.
PRINTER_DEVICEDEV_NAMEVARCHAR(10)The name of the printer device that is used for all spooled files created by jobs that use this job description. Can contain one of the following special values: *SYSVAL The value in the system value QPRTDEV at the time the job is started is used as the printer device name. *USRPRF The printer device name is obtained from the user profile of the job at the time the job is started. *WRKSTN The printer device name is obtained from the work station where the job was started.
PRINT_TEXTPRINT_TEXTVARCHAR(30)
Nullable
The line of text that is printed at the bottom of each page of printed output for jobs using this job description. Can contain the following special value: *SYSVAL The value in the system value QPRTTXT is used for jobs using this job description. Contains the null value if there is no text to print.
JOB_MESSAGE_QUEUE
_MAXIMUM_SIZE
MSGQ_MAXSMALLINT
Nullable
The maximum size (in megabytes) of the job message queue. The possible values are 2 to 64.Contains the null value if the maximum size is set by system value QJOBMSGQMX at the time the job is started.
JOB_MESSAGE_QUEUE_FULL
_ACTION
MSGQ_FULLVARCHAR(8)The action taken when the job message queue becomes full. *NOWRAP When the message queue becomes full, do not wrap. This action will cause the job to end. *PRTWRAP When the message queue becomes full, wrap the job queue and print the messages that are being overlaid. *SYSVAL The value is specified by the system value QJOBMSGQFL. *WRAP When the message queue becomes full, wrap to the beginning and start filling again.
SYNTAX_CHECK_SEVERITYSYNTAXSMALLINT
Nullable
Whether requests placed on the job’s message queue are checked for syntax as CL commands, and the message severity that causes a syntax error to end processing of a job. The possible values are:0-99Specifies the lowest message severity that causes a running job to end. The request data is checked for syntax as CL commands, and, if a syntax error occurs that is greater than or equal to the error message severity specified here, the running of the job that contains the erroneous command is suppressed.Contains the null value if the request data is not checked for syntax as CL commands. This is equivalent to *NOCHK.
JOB_END_SEVERITYJOB_ENDSEVSMALLINTThe 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. The possible values are from 0 through 99.
JOBLOG_OUTPUTJOBLOG_OUTVARCHAR(10)How the job log will be produced when the job completes. This does not affect job logs produced when the message queue is full and the job message queue full action specifies *PRTWRAP. Messages in the job message queue are written to a spooled file, from which the job log can be printed, unless the Control Job Log Output (QMHCTLJL) API was used in the job to specify that the messages in the job log are to be written to a database file.The job log output value can be changed at any time until the job log has been produced or removed. To change the job log output value for a job, use the Change Job (QWTCHGJB) API or the Change Job (CHGJOB) command. The job log can be displayed at any time until the job log has been produced or removed. To display the job log, use the Display Job Log (DSPJOBLOG) command.The job log can be removed when the job has completed and the job log has not yet been produced or removed. To remove the job log, use the Remove Pending Job Log (QWTRMVJL) API or the End Job (ENDJOB) command.The possible values are: *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. *SYSVAL The value is specified by the QLOGOUTPUT system value.
INQUIRY_MESSAGE_REPLYINQ_REPLYVARCHAR(8)How inquiry messages are answered for jobs that use this job description. *DFT The system uses the default message reply to answer any inquiry messages issued while the job is running. The default reply is either defined in the message description or is the default system reply. *RQD The job requires an answer for any inquiry messages that occur while the job is running. *SYSRPYL The system reply list is checked to see if there is an entry for an inquiry message issued while the 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.
MESSAGE_LOGGING_LEVELLOG_LEVELSMALLINTThe type of information logged.0No messages are logged.1All 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.2The 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.3The 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.4The 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_SEVERITYLOG_SEVSMALLINTThe severity level that is used in conjunction with the logging level to determine which error messages are logged in the job log. The possible values are from 0 through 99.
MESSAGE_LOGGING_TEXTLOG_TEXTVARCHAR(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 (if 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_COMMANDSLOG_CLVARCHAR(4)Whether or not commands are logged for CL programs that are run. *NO CL programs are not logged. *YES CL programs are logged.
DEVICE_RECOVERY_ACTIONDEVRECOVERVARCHAR(13)The action to take when an I/O error occurs for the interactive 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 a message to the application program indicating the job has reconnected and that the workstation 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). This message indicates that 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 history log (QHST). This message indicates that 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. *SYSVAL The value in the system value QDEVRCYACN at the time the job is started is used as the device recovery action for this job description.
TIME_SLICE_END_POOLTIME_SLICEVARCHAR(7)Whether interactive jobs using this job description should be moved to another main storage pool when they reach time-slice end. *BASE The job is moved to the base pool when it reaches time-slice end. *NONE The job is not moved when it reaches time-slice end. *SYSVAL The system value is used.
ALLOW_MULTIPLE_THREADSALWMLTTHDVARCHAR(4)Whether or not the job is allowed to run with multiple user threads. This attribute does not prevent the operating system from creating system threads in the job. This attribute is not allowed to be changed once a job starts. This attribute applies to autostart jobs, prestart jobs, batch jobs submitted from job schedule entries, and jobs started by using the Submit Job (SBMJOB) and Batch Job (BCHJOB) commands. This attribute is ignored when starting all other types of jobs. This attribute should be set to *YES only in job descriptions that are used exclusively with functions that create multiple user threads. *NO The job is not allowed to run with multiple user threads. *YES The job is allowed to run with multiple user threads.
WORKLOAD_GROUPWRK_GROUPVARCHAR(10)
Nullable
The name of the workload group that is used for jobs that use this job description. Can contain the following special value: *SBSD The workload group named in the subsystem description is used. Contains the null value if jobs using this job description do not have a defined workload group.
ASPGRPASPGRPVARCHAR(10)
Nullable
The name of the ASP group. This is the name of the primary ASP device in an ASP group or the name of an ASP device description. This specifies the initial ASP group setting for jobs using this job description. Contains the null value if jobs using this job description do not have an initial ASP group.
DDM_CONVERSATIONDDM_CONVVARCHAR(5)Whether the Distributed Data Management conversations are kept or dropped when they are not being used. The possible values are: *DROP The system ends a DDM-allocated conversation when there are no users. *KEEP The system keeps DDM conversation connections active when there are no users.

So what does the look like when we run it?

Let’s a really simple global retrieve of all job descriptions on the system:

select * from qsys2.job_description_info

Enter this in the IBM i ACS SQL Script tool like this:

Easy way to find all my IBM i Job Description (*JOBD) information 1

When this runs it will load a page a time.

Click the button (highlighted in red) to load all of the job descriptions in one go.

You can then either (a) copy/paste into a spreadsheet or (b) right click in the spreadsheet to download an Excel Spreadsheet to your desktop.

Hashtag Easy Peeezy

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Join the IBM i Community for FREE Presentations, Lessons, Hints and Tips

>