Get Library List

GetLibl

The GetLibl procedure returns the current library list value

The GetLibl procedure can be used to retrieve a library list into an array where each element of that array contains a library name.

array-of-char-values GetLibl(
  nLibLType      10I 0  Const Options(*NOPASS:*OMIT)
  nCount         10I 0  Options(*NOPASS)
)

See also: RtvLibl

Parameters

nLiblType [optional]
[input int(4) const]  An optional identifier that controls which library list is returned. If unspecified, the user-portion of the jobs library list is returned. The valid options for this parameter are as follows:
 
Constant Literal Value Description
LLUSRLIBL 0 The user-portion of the job's library list is returned (this is the default).
LLCURLIB 1 The current library is returned.
LLSYSLLBL 2 The system-portion of the job's library list is returned.
LLPRODLIBL 3 The production library or libraries are returned.
nCount [optional]
[output Int(4) ]  If specified, this parameter is set to a count of the number of library names returned by the procedure.

Return Value

If the function succeeds, the portion of the job's library list identified by the nLiblType parameter is returned as an array of 11-position character values. Each array element contains an array name. To determine the number of library names returned, specify an int4 (10i0) field on the nCount parameter and check its value upon completion of the procedure.

If the function fails, the return value is empty.

Remarks

An return value must be an array. To receive the library list into a character field, use the RTVLIBL procedure.

Example

 
      /INCLUDE QCPYSRC,LIBL
 
.....DName+++++++++++EUDSFrom+++To+++++TDc.Functions+++++++++
     D szMyLibl        S             11A   DIM(250)
     C                   Eval      szMyLibl = GetLibl(llUSRLIBL)