Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 8: keyed-sequential update (KSDS, RRDS) z/OS DFSMS Macro Instructions for Data Sets SC23-6852-02 |
|
In this example, GET and PUT macros are used to retrieve and update
fixed-length, 50-byte records. Records are updated synchronously in
a work area. This example requires the use of a work area because
you cannot update a record in the I/O buffer.
Decide whether to update
the record.
Update the record.
A GET for update (OPTCD=UPD) must precede a PUT for update. Besides retrieving the record to be updated, GET positions VSAM at the record retrieved, in anticipation of the succeeding update (or deletion). It is not necessary for you to store back (or delete) the record you retrieved for update. VSAM's position at the record previously retrieved allows you to issue another GET to retrieve the following record. You cannot, however, store back the previous record: the position for update has been forgotten because of the following GET. |
Copyright IBM Corporation 1990, 2014
|