z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


FIND—Positioning to the Starting Address of a File

z/OS DFSMS Using Data Sets
SC23-6855-00

To position to the beginning of a specific UNIX file, you must issue a FIND macro. The FIND macro uses the simulated relative track address (TTR) to identify the UNIX file. The next input or output operation begins processing at the point set by the FIND. The FIND macro lets you search a concatenated series of UNIX, PDSE, and PDS directories when you supply a DCB opened for the concatenated data sets.

There are two ways that you can direct the system to the correct file when you use the FIND macro:
  • Specify the address of an area that contains the name of the file.
  • Specify the address of the TTR field of the entry in a BLDL that list you have created by using the BLDL macro.
In the first case, the system searches the directory of the data set for the relative track address. In the second case, no search is required, because the TTR is in the BLDL list entry.

When the application program issues FIND, BPAM opens the specified file and establishes a connection. BPAM retains the logical connection until the program issues STOW DISC or CLOSE or ends the task.

If you want to process only one UNIX file, you can specify DSORG=PS using either BSAM or QSAM. You specify the name of the file that you want to process and the name of the UNIX in the PATH parameter of the DD statement. When you open the data set, the system places the starting address in the DCB so that a subsequent GET or READ macro begins processing at that point.

Restriction: You cannot use the FIND, BLDL, or STOW macro when you are processing one UNIX file sequentially.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014