Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
The iQuery.RTVJOBD() UDTF returns a one row result that contains the attributes for the specified *JOBD definition.
iQuery.RTVJOBD( library-name, Job Description Name )
The Library-name parameter is the name of the library that contains the job description object. The special values *CURLIB and *LIBL are supported along with a specified library name.
The Job Description Name parameter is the name of the job description whose description is retrieved.
Column | Type | Description |
JOBDNAME | varchar(10) | The name of the job description whose attributes have been returned. |
JOBDLIB | varchar(10) | The library in which the job description is located. |
USRPRF | varchar(10) | The user profile under which jobs that use this job description run. |
JOBDATE | varchar(8) | The Job Date attribute for the Job Description. Normally this is *SYSVAL but any hard-coded date may appear here. A hard-coded date is in the DATFMT attribute date format. |
SWS | varchar(8) | The UPSI Switches for the jobs. |
JOBQNAME | varchar(10) | The job queue on which jobs with this job description run by default, unless the SBMJOB command's JOBQ parameter is altered. |
JOBQLIB | varchar(10) | The library that contains the job queue. |
JOBPTY | varchar(2) | The run priority for jobs submitted using this job description. |
HOLD | varchar(10) | When this value is *YES, jobs submitted with this job description are held on the job queue. |
OUTQNAME | varchar(10) | The name of the output queue used for SPOOLED files generated by jobs submitted with this job description. |
OUTQLIB | varchar(10) | The library name of the Output Queue. |
OUTPTY | varchar(2) | The priority assigned to SPOOLED output generated by jobs submitted with this job description. |
PRTDEV | varchar(10) | The Print Device name assigned to jobs submitted with this job description. |
PRTTEXT | varchar(30) | The PRTTXT (Print Text) written at the bottom of each page by jobs submitted with this job description. |
SYNTAX | varchar(10) | Whether or not CL command syntax is checked and the highest error level that is permitted when doing so. A value of *NOCHK means no CL syntax checking is performed for jobs submitted with this job description. |
ENDSEV | int | The highest level error permitted before the job submitted with this job description is terminated. |
MSGLVL | varchar(1) | Part of the LOG() parameter elements. This is the first element and may be 0 to 4 |
MSGSEV | int | Part of the LOG() parameter elements. This is the second element and may be 00 to 99. |
MSGLOG | varchar(10) | Part of the LOG() parameter elements. This is the third element and may be *MSG, *SECLVL or *NOLIST. |
LOGCLPGM | varchar(10) | If *YES, CL commands run within CL programs are logged provided the CL program's own LOGCLPGM attribute is *JOB or *YES. If *NO is specified, then CL program commands are no logged. |
INQMSGRPY | varchar(10) | What to do when an Inquiry Message is generated by jobs submitted with this job description/ *RQD, *SYSRPY, *DFT |
DEVRCYACT | varchar(13) | The action to take when a device I/O error occurs for display file devices for jobs submitted with this job description. |
TSEPOOL | varchar(10) | Timeslice End action for jobs submitted with this job description. The values are *BASE, *NONE and *SYSVAL. |
ACCTCODE | varchar(15) | The 15-position accounting code assigned to jobs submitted with this job description. |
RTGDATA | varchar(80) | The routing data used to submit jobs submitted with this job description. |
OBJTEXT | varchar(50) | The text description of the Job Description. |
JOBMSGQMAX | int | The maximum size of the job message queue (0 to 64, in megabytes) for jobs submitted with this job description. |
ALWMULTTHD | varchar(10) | Inidicates whether or not jobs submitted with this job description allow multiple threads. The values are *YES and *NO. |
SPLFACTION | varchar(10) | Indicates whether or not SPOOLED files can be accessed through job interfaces once a job has completed its normal activity. |
DDMCNV | varchar(10) | Specifies whether DDM conversations are kept or dropped when the job ends. Values are *KEEP and *DROP. |
JOBLOGOUTPUT | varchar(10) | This attribute controls how the job log will be produced when the job completes. |
TIME_ZONE | varchar(10) | Reserved for V7R3 and later. Planned implementation Fall 2019. |
ERRMSGID | varchar(7) | If an error is issued while retrieving the Job Description, that CPF error message ID is copied to this column and returned. |
LIBL | varchar(3000) | The library list associated with the job description. Each library is separated by one or more blanks. |
The following example returns the job description, description for the QBATCH *JOBD..
select * from table( iQuery.rtvjobd('*LIBL','QBATCH')) jd';
JOBDNAME JOBDLIB USRPRF JOBDATE SWS JOBQNAME JOBQLIB JOBPTY HOLD OUTQNAME OUTQLIB OUTPTY QBATCH QGPL QPGMR *SYSVAL 00000000 QBATCH QGPL 5 *NO *USRPRF 5