DASD data sets

The SYNCDEV macro allows you to synchronize data from the following types of DASD data sets when open for update or output: All other types of data sets are not supported.

For DASD data sets, requests for synchronization information or for partial synchronization cause complete synchronization. The keywords ABUFBLK, BUFBLK, and INQ are ignored. Use the SYNCDEV macro if you need to ensure that a specific record is on DASD at a specific time.

Data is always synchronized at CLOSE (or STOW for PDSEs opened with DSORG=PO).

SYNCDEV guarantees that the data from previously checked output requests has been written to DASD. If you are using BSAM, you still need to issue a CHECK for each WRITE before issuing the SYNCDEV macro. When using SYNCDEV with QSAM, any records left in your current buffer are held if that buffer is only partially filled.

Instead of using the SYNCDEV macro, you can specify "Guaranteed Synchronous Write" through storage class to synchronize the data if the PDSE member is open for update or if the data set is a compressed format data set open for output. See z/OS DFSMSdfp Storage Administration for more information.

Restriction: Using SYNCDEV or of "Guaranteed Synchronous Write" can severely degrade performance of data transfer.

The SYNCDEV macro can 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 SYNCDEV macro is:

DCB=addrA-Type address or (2-12)
specifies the address of the data control block. When SYNCDEV is issued in 31-bit addressing mode, the input DCB address must be a clean 31-bit address.
ABUFBLK=addr| BUFBLK={maximum buffer depth|0}
specifies the maximum number of data blocks that can remain buffered.
ABUFBLK=addrA-Type address or (2-12)
specifies the address of a halfword on a halfword boundary containing a value that specifies the maximum number of data blocks that are buffered. This parameter has no effect on DASD.

This inquiry call also synchronizes DASD data sets as if BUFBLK=0 were coded. When issued in 31-bit addressing mode, the input ABUFBLK address must be a clean 31-bit address.

BUFBLK={maximum buffer depth|0}
specifies the maximum number of data blocks that are buffered. This number can be an absolute value from 0 to 65535. The BUFBLK value can be in the 2 low-order bytes of a register (2-12). This parameter has no effect on DASD.
0
If neither ABUFBLK nor BUFBLK is specified, the number of data blocks that are be buffered defaults to 0, and no data blocks are buffered.
INQ={YES|NO}
specifies whether this is a request for information about the degree of synchronization or a request for synchronization. This parameter has no effect on DASD.
YES
specifies an inquiry about how many data blocks are in the buffer. This inquiry call also synchronizes DASD data sets and sets the buffer depth to 0.
NO
specifies a request for synchronization based on the number of data blocks that can be buffered as specified in ABUFBLK or BUFBLK.

Register 0 returns the number of blocks that were in the buffer when SYNCDEV began.