Retrieve Library Description (RTVLIBD)

Where allowed to run: Compiled CL program or interpreted REXX (*BPGM *IPGM *BREXX *IREXX)
Threadsafe: Yes
Parameters
Examples
Error messages

The Retrieve Library Description (RTVLIBD) command retrieves the description of a library. The values are returned (copied) to the specified variables in the program.

For parameters that are returned into CL variables by this command, the parameter descriptive title/and prompt text lists the minimum length for the CL variable. For character variables, a single number is shown. For decimal variables, two numbers are shown. The first number indicates the minimum variable length and the second number indicates the minimum number of decimal positions.

Restrictions:

  1. You must have some authority other than *EXCLUDE authority for the library to retrieve the attributes of the library.
  2. You must have either all object (*ALLOBJ) or audit (*AUDIT) special authority to retrieve a value other than *NOTAVL for the create object auditing value.
Top

Parameters

Keyword Description Choices Notes
LIB Library Name Required, Positional 1
TYPE CL var for TYPE (10) Character value Optional
ASP CL var for ASP (2 0) Decimal number Optional
ASPDEV CL var for ASPDEV (10) Character value Optional
ASPGRP CL var for ASPGRP (10) Character value Optional
CRTAUT CL var for CRTAUT (10) Character value Optional
CRTOBJAUD CL var for CRTOBJAUD (10) Character value Optional
TEXT CL var for TEXT (50) Character value Optional
Top

Library (LIB)

Specifies the library for which attributes are to be retrieved. If a variable is specified, it must be 10 characters in length and contain a library name.

This is a required parameter.

name
Specify the name of the library for which attributes are to be retrieved.
Top

CL var for TYPE (10) (TYPE)

Specifies a 10-character variable used to return the library type. The value PROD or the value TEST is returned.

Top

CL var for ASP (2 0) (ASP)

Specifies a decimal (2 0) variable used to return the number of the auxiliary storage pool (ASP) from which the system allocates storage for the library. The following values can be returned:

1
The library is in the system auxiliary storage pool.
2-32
The library is in a user auxiliary storage pool.
-1
The library is in a primary or secondary auxiliary storage pool (ASP) with an ASP number larger than 32. The ASP device name for the primary or secondary ASP can be retrieved with the ASPDEV parameter.
Top

CL var for ASPDEV (10) (ASPDEV)

Specifies a 10-character variable used to return the name of the auxiliary storage pool (ASP) device where storage is allocated for the library. One of the following special values can be returned:

*N
The name of the ASP device cannot be determined.
*SYSBAS
The library is in the system ASP (ASP 1) or in a basic user ASP (ASPs 2-32).
Top

CL var for ASPGRP (10) (ASPGRP)

Specifies a 10-character variable used to return the name of the auxiliary storage pool (ASP) group where storage is allocated for the library. The ASP group name is the name of the primary ASP within the ASP group. One of the following special values can be returned:

*N
The name of the ASP device cannot be determined.
*SYSBAS
The library is in the system ASP (ASP 1) or in a basic user ASP (ASPs 2-32).
Top

CL var for CRTAUT (10) (CRTAUT)

Specifies a 10-character variable used to return the create authority value of the library. The value *SYSVAL, *CHANGE, *ALL, *USE, or *EXCLUDE, or the name of an authorization list is returned.

Top

CL var for CRTOBJAUD (10) (CRTOBJAUD)

Specifies a 10-character variable used to return the auditing value of the library. A value of *NOTAVL will be returned if you do not have either all object (*ALLOBJ) or audit (*AUDIT) special authority. The values that can be returned include *SYSVAL, *NONE, *USRPRF, *CHANGE, *ALL, and *NOTAVL. See the Create object auditing (CRTOBJAUD) parameter on the Create Library (CRTLIB) command for more information.

Top

CL var for TEXT (50) (TEXT)

Specifies a 50-character CL variable used to return the text description of the library.

Top

Examples

Assume that the library named TESTLIB was created as follows:

CRTLIB   LIB(TESTLIB)  CRTAUT(*ALL)  TEXT('John Smith library')

PGM Example

DCL   VAR(&CRTAUT)  TYPE(*CHAR)  LEN(10)
RTVLIBD   LIB(TESTLIB)  CRTAUT(&CRTAUT)

The RTVLIBD command will return a value of '*ALL ' in program variable &CRTAUT.

Top

Error messages

*ESCAPE Messages

CPF210E
Library &1 not available.
CPF2115
Object &1 in &2 type *&3 damaged.
CPF2150
Object information function failed.
CPF2151
Operation failed for &2 in &1 type *&3.
CPF980B
Object &1 in library &2 not available.
CPF9810
Library &1 not found.
CPF9820
Not authorized to use library &1.
CPF9830
Cannot assign library &1.
Top