Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
SQL iQuery Documentation - UDF and UDTF
has no ratings.
Published: 21 Jun 2019
Revised: 21 Jun 2019 - 1742 days ago
Last viewed on: 26 Mar 2024 (974 views) 
  1. SQL iQuery - RUNiQRY CL Command
  2. CSV() - Read and Parse Comma Separated Values File
  3. CSV_VAL() Extract CSV Column Value
  4. CSV_XXXX() Extract CSV Column Value as xxxx
  5. CSV_COUNT - Retrieve Field Count
  6. ObjExist - Check Object Exits
  7. DTAARA - Data Area
  8. encode_URL Encode URL for the Web
  9. encode_TAG Encode HTML TAG Content
  10. FLDLIST - List the Fields of a Table
  11. FROMHEX - Fold 2-hex Chars into 1 Char
  12. GET CPUCNT, CURLIB, ENV, SRLNBR, SYSNAME
  13. MD5_HASH - UDF - Return MD5 Hash
  14. ifsStat - Get IFS File Attributes
  15. ifsExists - Check if IFS File Exists
  16. ifsFile - Query Contents of IFS Text File
  17. ifsDIR - List IFS Directory Entires
  18. DEPFILE - List Dependent Database Relations
  19. JOB - Get Job Name Component
  20. Job_ATTR - Job Attributes
  21. JOB_DATE Retrieve the Job Date
  22. JOBLOG - Write Message to Joblog
  23. Library List UDF and Procedures
  24. MBRLIST - Member List
  25. MCHINFO Machine Type and Model Number and OS version
  26. OSVER and OSVRM Get IBM i Version/Release
  27. PrintPDF - Print a PDF to a PDF Compatible Printer
  28. CPYTOPDF - Copy SPOOLED File to PDF file
  29. OBJ_LIST List Object in a Library
  30. LIB_LIST List Descriptions of Libraries on the Library List
  31. OBJ_EXPORTS List Exported Items from an Object
  32. OBJ_STRUCT Retrieve Objects Components
  33. RTVCMDD Retrieve Command Definition
  34. RTVJOBA - Retrieve Job Attributes
  35. RTVJOBD - Retrieve Job Description
  36. RTVLASTSPLF - Retrieve ID of Last SPOOLED File for this Job
  37. RTVxxx - Retrieve Various Objects Description Table Functions
  38. WATCHLIST - List Current Watches
  39. Polymorphic Qualified Name Syntax

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.

iQuery.rtvjobd UDTF Published by: Bob Cozzi on 21 Jun 2019 view comments

Retrieve Job Description

The iQuery.RTVJOBD() UDTF returns a one row result that contains the attributes for the specified *JOBD definition.

Parameters

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.

Result Set Columns

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

Example

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     

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS