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.obj_struct() UDTF returns one row for each *MODULE and *SRVPGM that are "contained" within the specified *PGM or *SRVPGM object.
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.
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. |
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