Previous Topic: $SRV_IDR_LIST

Next Topic: $SRV_READ_IMOD

$SRV_PDS_LIST

The $SRV_PDS_LIST routine returns a listing of all members contained in a PDS. If requested, the user-data field is returned as ISPF statistics.

Syntax

Use this syntax:

CALL $SRV_PDS_LIST ddname [ISPF]

Parameters

The $SRV_PDS_LIST service routine takes these parameters:

ddname

DDname to allow access to the PDS.

ISPF

If specified, the returned user-data field is formatted as ISPF statistics.

Returned Data

Successful completion is indicated by the RC special variable being set to 0 and a null string returned as the result. Errors are indicated by a non-zero value in RC and an error message returned as the result.

Each PDS directory entry is returned on the stack. The first character of each record is a delimiter used to parse the individual fields. The order of the fields returned is as follows:

  1. Member name.
  2. ALIAS or TRUENAME, depending upon the entry.
  3. TTR of start of member (printable hexadecimal).
  4. Number of TTRs in the user data (whole number, meaningful for load libraries only).
  5. User data.

If ISPF was specified as an option and the user-data appears to be valid ISPF statistics, the user data field is converted to the following blank-delimited fields:

  1. The version and modification level specified as vv.mm. The vv and mm values are whole numbers in the range of 0 through 255.
  2. The creation date for this member. The format is mm/dd/yy.
  3. The date of last modification. The format is mm/dd/yy.
  4. The time of last modification. The format is hh:mm or hh:mm:ss where hh ranges from 0 through 24, mm ranges from 0 through 59, and ss ranges from 0 through 59. The hh, mm, and ss values are whole numbers.

    Note: ISPF began storing change seconds with Release 3.3. Prior releases only stored hours and minutes.

  5. The current size in lines (logical records) of the member. This is a whole number in the range of 0 through 65535.
  6. The size in lines (logical records) of the member when it was created. This is a whole number in the range of 0 through 65535.
  7. The number of times this member has been modified. This is a whole number in the range of 0 through 65535.
  8. The user ID of the user who last updated (or created) this member. This is a seven-character field (the eighth character, if any, is truncated), right-padded with blanks.