WRITE

Top  Previous  Next

You use this command to write a record to a direct access data set on a local or remote system.

For a VSAM entry-sequenced data set (ESDS) the record is always added at the end of the data set.

For a VSAM KSDS, the record is added in the location specified by the associated key; this location may be anywhere in the data set.

WRITE    DATASET(dsname)
FROM(area)
RIDFLD(ridfld)
[ KEYLENGTH(klen) ]
[ SYSID (sysid) ]
[ LENGTH(arealen) ]
[ RBA | RRN ]

Options

DATASET(dsname)

specifies the name of the file to be accessed.

FROM(area)

specifies the record that is to be written to the data set referred to by this file.

KEYLENGTH(KEYLEN)

specifies the length (halfword binary) of the key that has been specified in the RIDFLD option, except when RBA or RRN is specified, in which case it is not valid.

LENGTH

specifies the length, as a halfword binary value, of the record to be written

RBA

specifies that the record identification field specified in the RIDFLD option contains a relative byte address

RIDFLD(ridfld)

specifies the record identification field. The contents can be a key, a relative byte address, or a relative record number.

RRN

specifies that the record identification field specified in the RIDFLD option contains a relative record number.

SYSID(sysid)

specifies the name (1-4 characters) of the system the request is directed to.