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


Factors to Consider When Allocating Direct Access Data Sets

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

When the system allocates a new data set with DSORG=PS or no DSORG, the access methods treat the data set as being null, that is, having no data. A program can safely read the data set before data has been written in it. The system writes a file mark at the beginning of the data set if it has at least one track. If the data set begins with a file mark or has no space allocated on the volume, the first GET or first CHECK for a READ causes the EODAD routine to be called.

If your program finds a way to read beyond the file mark, the program will receive unpredictable results such as reading residual data from a prior user, getting an I/O error or getting an ABEND. Reading residual data can cause your program to appear to run correctly, but you can get unexpected output from the residual data.

After a data set is created, you can reset it so that it again begins with a file mark. To do that, you can run a program that opens the data set for output and closes it without writing anything.

After you delete your data set containing confidential data, you can be certain another user cannot read your residual data if you use the erase feature described in Erasing DASD Data.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014