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


Writing a Block

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

The WRITE macro places a data block in an output data set from a designated area of virtual storage. The WRITE macro can also be used to return an updated data block to a data set. To permit overlap of output operations with processing, the system returns control to your program before the write operation is completed. You must test the DECB that is created for the write operation for successful completion before you reuse the DECB. For ASCII tape data sets, do not issue more than one WRITE on the same block, because the WRITE macro causes the data in the record area to be converted from EBCDIC to ASCII. Or, if CCSIDs are specified for ISO/ANSI V4 tapes, from the CCSID specified for the application program to the CCSID of the data records on tape.

As with the READ macro, you can specify variations of the WRITE macro according to the organization of the data set and type of processing to be done by the system as follows.

Sequential :
SF
Write the data set sequentially.
Direct :
SD
Write a dummy fixed-length record. (BDAM load mode)
SZ
Write a capacity record (R0). The system supplies the data, writes the capacity record, and advances to the next track. (BDAM load mode)
SFR
Write the data set sequentially with next-address feedback. (BDAM load mode, variable spanned)
D
Use the direct access method.
I
Search argument identifies a block.
K
Search argument is a key.
A
Add a new block.
F
Provide record location data (feedback).
X
Release exclusive control.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014