Object Struct using iQuery (IQRYOBJ)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Object Struct using iQuery (iQRYOBJ) command lists the *MODULE and *SRVPGM components of the object(s) specified. It uses the iQuery OBJSTRUCT() UDTF to generate the list. This is basically a wrapper for this UDTF making easier to use.

Restrictions:

Top

Parameters

Keyword Description Choices Notes
OBJ Program or Service Program Qualified object name Required, Positional 1
Qualifier 1: Program or Service Program Generic name, name, *ALL
Qualifier 2: Library Name, *LIBL, *CURLIB, *ALLUSR, *ALL
OBJTYPE Object type *ALL, *PGM, *SRVPGM Optional, Positional 2
REFTYPE Referenced Component type *ALL, *MODULE, *SRVPGM Optional, Positional 3
OMITLIB Omit references to library Name, QSYS, *NONE Optional, Positional 4
WHERE Results selection Character value, *NONE Optional, Positional 5
OUTPUT Output *, *PRINT, *PDF, *EXCEL Optional, Positional 6
Top

Program or Service Program (OBJ)

Specifies the name (generic, full or *ALL) of the program or service program that will be included on the list. The contents of these objects shall be listed.

This is a required parameter.

Qualifier 1: Program or Service Program

*ALL
All programs and service program included in the list are
generic-name
Specify a generic name for the programs and service programs to be included on the list.
name
Specify the name of a single object whose contents shall be listed.

Qualifier 2: Library

*LIBL
The library list is used to search for the objects.
*CURLIB
Objects in the job's current library or QGPL (if not CURLIB exists) are included on the list.
name
Specify the name of library that contains the specified objects.
Top

Object Type (OBJTYPE)

Specifies the type of objects whose structure is listed.

*ALL
Both *PGM and *SRVPGM objects are included on the list.
*PGM
The contents/structure of program objects that match the object name specified on the OBJ parameter are listed.
*SRVPGM
The contents/structure of program and service program objects that match the object name specified on the OBJ parameter are listed.
Top

Referenced Object Type (REFTYPE)

Specifies the type of component (reference) objects that are listed. This allows users to list only the *MODULE objects or only the *SRVPGM objects that make up the parent object.

*ALL
Both *MODULE and *SRVPGM objects are included on the list.
*MODULE
Only the *MODULE names that make up the parent object are included in the results.
*SRVPGM
Only the *SRVPGM names that make up the parent object are included in the results.
Top

Library to omit (OMITLIB)

Specifies the name of a library whose references shall not be included. For example, many IBM runtime service programs may be attached to your own programs. Specifying OMITLIB(QSYS) causes these references to NOT be included in the results.

QSYS
Any referenced objects that are in QSYS are not included in the result.
*NONE
All referenced objects regardless of library are included in the results.
library_name
Specify the name of a library whose referenced objects are not included in the results.
Top
Top

Output (OUTPUT)

Specifies where the listing is generated.

*
The modules and service programs listing is displayed to the user.
*PRINT
The modules and service programs listing is printed (SPOOLED).
*PDF
The modules and service programs are written to a *PDF file in the user's home directory. For example, if user COZZI is running iQRYOBJ, then the PDF is created in the /home/cozzi folder.
*EXCEL
The modules and service programs are written to a *SLK file in the user's home directory. For example, if user COZZI is running iQRYOBJ, then the PDF is created in the /home/cozzi folder. *SLK files may be directly opened in MS Excel or compatible programs.
Top

Examples

None
Top

Error messages for iQRYOBJ

*ESCAPE Messages

CPF9801
Object &2 in library &3 not found.
CPF9802
Not authorized to object &2 in &3.
CPF9803
Cannot allocate object &2 in library &3.
CPF9807
One or more libraries in library list deleted.
CPF9808
Cannot allocate one or more libraries on library list.
CPF9810
Library &1 not found.
CPF9811
Program &1 in library &2 not found.
CPF9812
File &1 in library &2 not found.
CPF9820
Not authorized to use library &1.
CPF9830
Cannot assign library &1.
CPF9899
Error occurred during processing of command.
Top