DSPOBJD (Display Object Description) Command Description

DSPOBJD Command syntax diagram

Purpose

The Display Object Description (DSPOBJD) command shows the names and attributes of specified objects in the specified library or in the libraries of the thread's library list. The command can also be used to show the names and attributes of libraries themselves.

Only the object attributes of each object are shown; the data attributes of data in the object, and the actual data in the object, are not shown. Also indicated is whether an object being shown has been damaged (possibly by a system failure).

Any OS/400 system object for which the user has some authority can be shown by this command. Libraries for which the user does not have execute authority cannot be shown, even if specified in the command. Start of changeIf only one object is to be shown, the user can specify it by entering the object name, object type, the name of the library where it is located, and the auxiliary storage pool (ASP) device where the library is located. Depending on the values specified for the qualified object name (OBJ parameter), the object type (OBJTYPE parameter), and the auxiliary storage pool device name (ASPDEV parameter), either the first object found in the specified libraries is shown, or all objects in the specified libraries for which the user has some authority are shown.>

Notes:

  1. For objects that are damaged or locked, the information shown, printed, or written to the output file is incomplete. An indication that the object is locked or damaged is written to the output file. If the description of the object is shown or printed, the text for the damaged or locked object indicates either the damaged or locked status.
  2. The size of a library object does not include the sizes of the objects in the library. The size of a library, including the sizes of the objects in the library, can be obtained using the DSPLIB command with OUTPUT(*PRINT) or the Retrieve Library Description (QLIRLIBD) API.

Restrictions:

  1. You must have *EXECUTE authority for the specified libraries, and some authority (that is, any one of the authorities other than *EXCLUDE) for each of the objects. If you do not have *EXECUTE authority to a library, none of its objects are shown.
  2. The user must have *EXECUTE authority for the auxiliary storage pool (ASP) device if a specific ASP device name is specified on the ASPDEV parameter.>

Required Parameters

OBJ
Specifies which objects in the libraries are to have their object attributes shown. If no library qualifier is specified, *LIBL is assumed, and all libraries in the thread's library list are searched for the objects. Objects in the library for which the user does not have some authority are not shown.

The name of the object can be qualified by one of the following library values:

*LIBL:Start of change All libraries in the thread's library list are searched. If ASPDEV is specified when this value is used, ASPDEV(*) is the only valid value.>

*CURLIB:Start of change The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched. If ASPDEV is specified when this value is used, ASPDEV(*) is the only valid value.End of change

*USRLIBL:Start of change Only the libraries in the user portion of the thread's library list are searched. If ASPDEV is specified when this value is used, ASPDEV(*) is the only valid value.End of change

*ALL:Start of change All libraries in the auxiliary storage pools specified by the ASPDEV parameter are searched.End of change

*ALLUSR Libraries

library-name: Specify the name of the library to be searched.

*ALL: All objects in the libraries identified in the library qualifier, which are of the types specified by the OBJTYPE parameter, are shown.

Notes:

  1. If the library qualifier is *ALL, *ALLUSR, or a library name, all objects of the specified types for which the user has some authority (for example, object operational authority) and that are in the specified libraries are shown.
  2. The user can show only those objects for which the user has some authority. >

generic*-object-name: Specify the generic name of the object. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all objects with names that begin with the generic prefix for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name. For more information on the use of generic names, refer to generic names.

object-name: Specify the name of the object that is shown.

Single Values

*ALLUSR: When the object name has a value of *ALLUSR, the object type must be *LIB. All user libraries in the auxiliary storage pools specified by the ASPDEV parameter are shown. Refer to *ALLUSR in the description of the library qualifier above for a definition of user libraries.End of change

*IBM: When the object name has a value of *IBM, the object type must be *LIB. All libraries in the auxiliary storage pools specified by the ASPDEV parameter which are saved/restored on the SAVLIB/RSTLIB CL commands with LIB(*IBM) are shown.End of change

OBJTYPE
Specifies the types of objects that are shown. More information on this parameter is in commonly used parameters.

*ALL: All object types that have the specified object name are shown. If the library qualifier specified or assumed for the OBJ parameter is *USRLIBL or *LIBL and the object name is a specific name (not *ALL and not a generic name), *ALL cannot be specified for OBJTYPE.End of change

object-type: Specify one or more values for the types of OS/400 system objects to be shown. Any of the OS/400 system object types can be specified. Objects in the specified libraries, as well as libraries themselves, that have the object types specified have their object attributes shown. If the library qualifier specified or assumed for the OBJ parameter is *USRLIBL or *LIBL Start of change and the object name is a specific name (not *ALL and not a generic name), >only one object type (and it cannot be *ALL) can be specified.

Optional Parameters

DETAIL
Specifies which set of attributes is shown for each object.

When the output is directed to a database file, the DETAIL parameter is ignored and all object attribute information is written to the file.

*BASIC: The display or printed output contains the name and a basic set of object attributes for each object.

*FULL: The display or printed output contains the name and a full set of object attributes for each object, which includes the basic set of attributes.

*SERVICE: The display or printed output contains the service-related attributes for each object.

ASPDEV
Specifies the auxiliary storage pool (ASP) device name where storage is allocated for the library of the object being displayed (LIB parameter). If the library resides in an ASP that is not part of the thread's library name space, this parameter must be specified to ensure the correct library is searched. ASPDEV(*) is the only valid value if *LIBL, *CURLIB, or *USRLIBL is specified as the library qualifier on the OBJ parameter.

Single Values

*: The ASPs that are currently part of the thread's library name space will be searched to locate the library. This includes the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32), and, if the thread has an ASP group, the primary and secondary ASPs in the thread's ASP group.

*ALLAVL: All available ASPs will be searched. This includes the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32), and all available primary and secondary ASPs (ASPs 33-255 with a status of 'Available'). ASPs and libraries to which the user is not authorized are bypassed and no authority error messages are sent.

*CURASPGRP: If the thread has an ASP group, the primary and secondary ASPs in the ASP group will be searched to locate the library. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched.

*SYSBAS: The system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32) will be searched to locate the library. No primary or secondary ASPs will be searched, even if the thread has an ASP group.

Element 1: Auxiliary storage pool (ASP) device

auxiliary-storage-pool-device-name: The device name of the primary or secondary ASP to be searched. The primary or secondary ASP must have been activated (by varying on the ASP device) and have a status of 'Available'. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched.

Element 2: Auxiliary storage pool (ASP) search type

*ASP: Specifies that only the single auxiliary storage pool (ASP) device named in element 1 is to be searched

*ASPGRP: Specifies that the entire group of the primary auxiliary storage pool (ASP) device named in element 1 is to be searched.>

OUTPUT
Specifies whether the output from the command is shown at the requesting work station, printed with the thread's spooled output, or directed to a database file. More information on this parameter is in commonly used parameters.

*: Output requested by an interactive thread is shown on the display. Output requested by a batch thread is printed with the thread's spooled output.

*PRINT: The output is printed with the thread's spooled output.

*OUTFILE: The output is directed to the database file specified on the OUTFILE parameter.

Note: All data is written to the file specified on the OUTFILE parameter regardless of the value specified on the DETAIL parameter.
OUTFILE
Specifies the qualified name of the database file to which the output of the display is directed. If the OUTFILE does not exist, this command creates a database file in the specified library. If the file is created, the text is 'output file for DSPOBJD'. The public authority is the same as the create authority specified for the library in which the file is created. The database format (QLIDOBJD) of the output file is the same as that used in the IBM-supplied file database QADSPOBJ.

The name of the database file can be qualified by one of the following library values:

*LIBL: All libraries in the thread's library list are searched until the first match is found.

*CURLIB: The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is used.

library-name: Specify the name of the library to be searched.

database-file-name: Specify the name of the database file that receives the output of the display.

OUTMBR
Specifies the name of the database file member to which the output is directed. If a member already exists, the system uses the second element of this parameter to determine whether the member is cleared before the new records are added. If the member does not exist and a member name is not specified, the system creates a member with the name of the output file specified on the OUTFILE parameter. If an output file member name is specified, but the member does not exist, the system creates it.

Element 1: Member to Receive Output

*FIRST: The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified on the OUTFILE parameter.

member-name: Specify the file member that receives the output. If OUTMBR(member-name) is specified and the member does not exist, the system creates it.

Element 2: Operation to Perform on Member

*REPLACE: The system clears the existing member and adds the new records.

*ADD: The system adds the new records to the end of the existing records.

Examples for DSPOBJD

Example 1: Displaying a Basic Description of Objects

DSPOBJD  OBJ(X/PAY)  OBJTYPE(*ALL)

A basic description of all the objects (for which the user has some authority) that are named PAY in library X are shown. Objects in the library for which the user has no authority are not shown.

Example 2: Displaying a Full Description of a Program

DSPOBJD  OBJ(X/PAY)  OBJTYPE(*PGM)  DETAIL(*FULL)

A full description of the program named PAY in library X is shown. The display includes all the attributes of the program.

Example 3: Displaying Program Information

DSPOBJD  OBJ(*USRLIBL/PAY)  OBJTYPE(*PGM)

This command shows information about the first program named PAY that is found in the user portion of the thread's library list.

Example 4: Displaying a Basic Description of Files

DSPOBJD  OBJ(Z/ABC*)  OBJTYPE(*FILE)

A basic description of all of the files whose names begin with ABC (generic name) located in library Z, for which the user has some authority, are shown.

Error messages for DSPOBJD

*ESCAPE Messages

CPFB8ED
Device description &1 not correct for operation.End of change
CPF2105
Object &1 in &2 type *&3 not found.
CPF2110
Library &1 not found.
CPF2113
Cannot allocate library &1.
CPF2114
Cannot allocate object &1 in &2 type *&3.
CPF2115
Object &1 in &2 type *&3 damaged.
CPF2121
One or more libraries cannot be accessed.
CPF2123
No objects of specified name or type exist in library &2.
CPF2124
No specified objects can be displayed from library &2.
CPF2150
Object information function failed.
CPF2173
Value for ASPDEV not valid with special value for library.End of change
CPF2176
Library &1 damaged.
CPF2177
OBJTYPE value not compatible with OBJ value.
CPF218C
&1 not a primary or secondary ASP.End of change
CPF218D
&1 not a primary ASP when *ASPGRP specified.End of change
CPF2182
Not authorized to library &1.
CPF2189
Not authorized to object &1 in &2 type *&3.
CPF326B
Damage to file &1 in library &2.
CPF9809
Library &1 cannot be accessed.End of change
CPF9814
Device &1 not found.End of change
CPF9825
Not authorized to device &1.End of change
CPF9827
Object &1 cannot be created or moved into &2.
CPF9833
*CURASPGRP or *ASPGRPPRI specified and thread has no ASP group.End of change
CPF9845
Error occurred while opening file &1.
CPF9846
Error while processing file &1 in library &2.
CPF9847
Error occurred while closing file &1 in library &2.
CPF9850
Override of printer file &1 not allowed.
CPF9851
Overflow value for file &1 in &2 too small.
CPF9860
Error occurred during output file processing.