ENTRY ACB MACRF=(ADR,SEQ,OUT)
ADRUPD RPL ACB=ENTRY, UPD indicates update (or deletion). x
AREA=WORK, x
AREALEN=200, x
OPTCD=(ADR,SEQ, x
. SYN,UPD,MVE)
.
LOOP GET RPL=ADRUPD
LTR 15,15
BNZ ERROR
SHOWCB RPL=ADRUPD, Determine record length. x
AREA=RECLEN, x
FIELDS=RECLEN, x
LENGTH=4
LTR 15,15
BNZ CHECKO
.
PUT RPL=ADRUPD
LTR 15,15
BNZ ERROR
B LOOP
ERROR ... Request was not accepted, or failed.
CHECKO ... Display failed.
.
WORK DS CL200 Record-processing work area.
RLNGTH DS F Display area for length of records.
If you have inactive records in your entry-sequenced data set, you may reuse the space they occupy by retrieving the records for update and restoring a new record in their place.
With a key-sequenced data set, it is not possible to change the length of records by addressed update because the index is not used and VSAM could not split a control interval if required because of changing record length.
Addressed-direct update varies from sequential update in the specification of an RBA for a search argument.