BLDL—Build a directory entry list (BPAM)

The BLDL macro is used to obtain a list of information from the directory of a partitioned data set or partitioned data set extended (PDSE). The problem program must supply a storage area that includes information about: Member and alias names in the list must be in alphameric order. You must test all read and write operations using the same data control block for completion before issuing the BLDL macro.

The BLDL macro establishes a connection to each PDSE member when it is found in the PDSE directory, unless the NOCONNECT option is used. The connection remains until the PDSE is closed. See z/OS DFSMS Using Data Sets for more information on the BLDL macro and PDSE connections.

The BLDL macro may be issued in 24- or 31-bit addressing mode. When issued in 31-bit addressing mode, all addresses must be valid 31-bit addresses.

The format of the BLDL macro is:

dcb address—RX-Type Address, (2-12) or (1)
specifies the address of an open data control block (DCB). The DCB must be opened to a partitioned data set, a PDSE, a z/OS® UNIX directory or a concatenation of any combination of them. You can specify zero to indicate that the data set search order begins with the task libraries, then proceeds to the job library or step library (whichever is active) followed by the link list libraries.

If you specify a non-zero DCB address and a requested member is not found in the partitioned data set, UNIX directory or concatenation to which the DCB is open, then the search for that member will stop; the job library, step library, task libraries or link list libraries will not be searched.

list address—RX-Type Address, (2-12), or (0)
specifies the address of the list completed when the BLDL macro is issued. The list must be on a halfword boundary. When BLDL is issued in 31-bit addressing mode, the list may reside above the 16MB line. The list address points to the FF field of the parameter list without regard to whether a prefix was specified. The following figure shows the format of the list:
FF (list address), 2 bytes; LL (list description field), 2 bytes; NAME1 (start of list entry), 8 bytes; TTR, 3 bytes; K, 1 byte; Z, 1 byte; C, 1 byte; USER DATA, 0-62 bytes (end of list entry)

FF: This field must contain a binary value indicating the total number of entries in the list.

LL: This field must contain a binary value indicating the length, in bytes, of each entry in the list. If the exact length of the entry is known, specify the exact length. Otherwise, specify at least 62 bytes (decimal) if an entry in the list is to be used with an ATTACH, LINK, LOAD, or XCTL macro. The minimum length for a list is 12 bytes.

NAME: This field must contain the member name or alias to be located. The name must start in the first byte of the name field and be padded to the right with blanks (if necessary) to fill the 8-byte field.

When the BLDL macro is executed, 5 fields of the directory entry list are filled in by the system. The specified length (LL) must be at least 14 bytes to fill in the Z and C fields. If the LL field is 12 bytes, only the NAME, TT, R, and K fields are returned. The 5 fields are:

TT: Indicates the two-byte relative track number where the beginning of the member is located.

R: Indicates the one-byte relative block (record) number on the track indicated by TT.

For a PDSE or a UNIX directory, TTR is a token that does not represent the physical location of the member in the data set.

K: Indicates the concatenation number of the data set. For the first or only data set, this value is zero.

Z: Indicates where the system found the directory entry:
Code
Meaning
0
Private library
1
Link library
2
Job, task, or step library
3-16
Job, task, or step library of parent task n, where n = Z-2
C: Indicates the type of name (primary or alias) for the number of note list fields (TTRNs), and the length of the user data field (indicated in halfwords). The following describes the meaning of the 8 bits:
Bit
Meaning
0=0
Indicates a member name.
0=1
Indicates an alias.
1-2
Indicates the number of TTRN fields (maximum of 3) in the user data field.
3-7
Indicates the total number of halfwords in the user data field.

USER DATA: The user data field contains the user data from the directory entry. If the length of the user data field in the BLDL list is equal to or greater than the user data field of the directory entry, the entire user data field is entered in the list. Otherwise, the list contains only the user data for which there is space.

NOCONNECT
specifies that the PDSE member is not to be connected. When issuing BLDL, you must provide a prefix of 8 bytes that immediately precedes the list of member names. The BLDL macro expansion will clear and initialize the prefix. The listaddr parameter must point to the FF field.
BYPASSLLA
specifies that the search for members should not include searching Library Lookaside.
START=concat byte address —RS-type address, (2-12)
specifies either the address of a byte which contains the concatenation number for the first data set to be searched in the concatenation or it specifies a register containing the number (not the address of the number). The concatenation number is relative to zero.
STOP=concat byte address —RS-type address, (2-12)
specifies either the address of a byte which contains the concatenation number for the last data set to be searched in the concatenation or it specifies a register containing the number (not the address of the number). The concatenation number is relative to zero.