FIND—Establish the beginning of a data set member (BPAM)

The FIND macro causes the system to use the address of the first block of a specified partitioned data set member as the starting point for the next READ macro for the same data set. All previous input and output operations that specified the same data control block must have been tested for completion before the FIND macro is issued.

When used with a PDSE, the FIND macro establishes a connection to a PDSE member. If FIND by relative address (C option) was specified, the connection remains until the PDSE is closed. If FIND by name (D option) was specified, the connection remains until you position to another member.

If the PDSE is open for output, close it and reopen it for input or update processing before issuing the FIND macro. See z/OS DFSMS Using Data Sets for more information on using the FIND macro and PDSE connections.

You can issue the FIND macro in 24- or 31-bit addressing mode. When issued in 31-bit addressing mode, all addresses must be valid 31-bit addresses. If the DCB points to a DCBE that resides above the 16MB line, you must issue the FIND macro in 31-bit addressing mode.

The format of the FIND macro is:

dcb address—RX-Type Address, (2-12), or (1)
specifies the address of the data control block for the opened partitioned data set being processed.
name address—RX-Type Address, (2-12), or (0)
specifies the address of an 8-byte field that contains the data set member name. The name must start in the first byte and be padded on the right (if necessary) to complete the 8 bytes. The name address may point above or below the 16MB line.
D
specifies that only a member name has been supplied, and the access method must search the directory of the data set indicated in the data control block to find the location of the member.
ttr address—RX-Type Address, (2-12), or (0)
specifies the address of a 4-byte area that contains the 3-byte relative address (TTR) and a 1-byte concatenation number (C). The TTRC address can point to the TTRC field in a BLDL list entry completed by using a BLDL macro for the data set being processed.
C
specifies that a TTRC address has been supplied, and no directory search is required. The TTRC address supplied is used directly by the access method for the next input operation.
generation plist—RX-Type Address, (2-12), or (0)
Offset Length Contents
X'00' 2 Length of plist=20
X'02' 1 Must be zero
X'03' 1 Must be zero
X'04' 4 Length of the member name
X'08' 8 Member name
X'10' 4 Generation number (returned by DESERV) or a negative relative generation number
G
specifies that a member name and generation are being passed and that the records from the generation should be returned.

Rule: Do not use the FIND macro after WRITE and STOW processing without first closing the data set and reopening it for INPUT processing.