Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 9: keyed-direct update (KSDS, variable-length 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
records. The MODCB macro is used to modify record length (RECLEN)
in the request parameter list when an update causes the record length
to change. The maximum record length is 120 bytes. The search argument
is a full key (5 bytes), compared equal.
Process input and get search argument
into KEYAREA; proceed to retrieve a record:
Update the record. Does
the update change the record's length?
You cannot update records in the I/O buffer. A direct GET for update positions VSAM at the record retrieved, in anticipation of storing back (or deleting) the record. This positioning also allows you to switch to sequential access to retrieve the next record. VSAM releases exclusive control of a control interval when a PUT DIR is issued following a GET UPD request. You do not have to store back a record that you retrieve for update, but, if you do not store it back before another retrieval, the current updates are lost. |
Copyright IBM Corporation 1990, 2014
|