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: 20 Jun 2019
Revised: 19 Jul 2019 - 458 days ago
Last viewed on: 18 Oct 2020 (230 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.obj_Struct - UDTF Published by: Bob Cozzi on 20 Jun 2019 view comments

List *MODULEs and *SRVPGMs that Make Up an Object

The iQuery.obj_struct() UDTF returns one row for each *MODULE and *SRVPGM that are "contained" within the specified *PGM or *SRVPGM object.

Parameters

iQuery.obj_struct( library-name, object-name, object-type )

The library-name is the name of the library that contains the object-name specified on the second parameter.

The object-name is the name of the object whose *MODULE and *SRVPGM object names are returned.

The optional object-type may be *SRVPGM, *MODULE or *ALL. The default is *ALL.

Result Set Columns

Column Type Description
OBJNAME varchar(10) The name of the object whose content has been extracted.
OBJLIB varchar(10) The library name of the object whose content has been extracted.
OBJTYPE varchar(10) The Object Type of the object whose content has been extracted.
OBJCRTSYS varchar(9) The System Name on which the object was created.
OBJCRTDATE DATE The date the object was created.
LASTUSEDDATE DATE The last used date for the object.
OBJOWNER varchar(10) The owner of the object.
The columns below apply to the extracted or so called "referenced" object.
REFOBJNAME varchar(10) The referenced object name.
REFOBJLIB varchar(10) The referenced object library name.
REFOBJTYPE varchar(10) The referenced object type. Either *MODULE or *SRVPGM.
SRCFILE varchar(10) The source file used to create the referenced objecdt.
SRCLIB varchar(10) The source library that contains the source file used to create the referenced objecdt.
SRCMBR varchar(10) The source member name used to create the referenced object.
SRCTYPE varchar(10) The SEU Source Type of the member used to create the referenced object.
SRCMBRLASTCHGDATE DATE The Last Changed Date for the Source Member used to create the referenced object.
SRCMBRLASTCHGTIME TIME The Last Changed Time for the Source Member used to create the referenced object.
DEBUG varchar(10) The DBGVIEW parameter attribute used to create the referenced object.
REFOBJCRTDATE DATE The date the referenced object was created.
REFOBJCRTTIME TIME The time the referenced object was created.
SRVPGMACT varchar(10) If REFOBJTYPE = *SRVPGM, this contains the Activation attribute *IMMED or *DEFER
SIGNATURE varchar(32) If REFOBJTYPE = *SRVPGM, this is the ILE Signature for the Service Program.

Example

The following creates a list of the *MODULE objects that were used to create the COZTOOLS Service Program.

select refobjname,refobjlib,refobjtype,srcfile, srclib, srcmbr, srctype 
from table(iquery.obj_struct('COZTOOLS','COZTOOLS')) struct

An excerpt from the resultSet generated by the above statement follows:

REFOBJNAME  REFOBJLIB   REFOBJTYPE  SRCFILE     SRCLIB      SRCMBR      SRCTYPE
CVTCASE     COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    CVTCASE     RPGLE  
CVTCCSID    COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    CVTCCSID    RPGLE  
CVTDATA     COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    CVTDATA     RPGLE  
CVTDATE     COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    CVTDATE     RPGLE  
CVTDEC      COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    CVTDEC      RPGLE  
CVTEDIT     COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    CVTEDIT     RPGLE  
CVTHEX      COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    CVTHEX      RPGLE  
DATES       COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    DATES       RPGLE  
EXPORTS     COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    EXPORTS     RPGLE  
FASTSCAN    COZTOOLS    *MODULE     QCSRC       COZTOOLS    FASTSCAN    CLE    
FKEYS       COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    FKEYS       RPGLE  
FORMAT      COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    FORMAT      RPGLE  
GENUUID     COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    GENUUID     RPGLE  
GETDEVIP    COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    GETDEVIP    RPGLE  
GETDSKSTS   COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    GETDSKSTS   RPGLE  
GETOSVER    COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    GETOSVER    RPGLE  
GETPTFLVL   COZTOOLS    *MODULE     QRPGLESRC   COZTOOLS    GETPTFLVL   RPGLE 

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

COMMENTS