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


Updating in Place

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

When you update a data set in place, you read, process, and write records back to their original positions without destroying the remaining records on the track. The following rules apply:
  • You must specify the UPDAT option in the OPEN macro to update the data set. To perform the update, you can use only the READ, WRITE, CHECK, NOTE, and POINT macros or you use only GET and PUTX macros. To use PUTX, code MACRF=(GL,PL) on the DCB macro.
  • You cannot delete any record or change its length.
  • You cannot add new records.
  • The data set must be on a DASD.
  • You must rewrite blocks in the same order in which you read them.

A record must be retrieved by a READ or GET macro before it can be updated by a WRITE or PUTX macro. A WRITE or PUTX macro does not need to be issued after each READ or GET macro.

The READ and WRITE macros must be execute forms that refer to the same data event control block (DECB). The DECB must be provided by the list forms of the READ or WRITE macros.

Restriction: You cannot use the UPDAT option to open a compressed-format data set, so an update-in-place is not allowed on it.

Related reading: See z/OS DFSMS Macro Instructions for Data Sets for information about the execute and list forms of the READ and WRITE macros.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014