



The REWRITE statement logically replaces an existing record in a direct-access file. When the REWRITE statement is executed, the associated direct-access file must be open in I-O mode.
___ Format _____________________________________________________________
| |
| >>__REWRITE__record-name-1__ ____________________ ___________________> |
| |_FROM__identifier-1_| |
| |
| >__ __________________________________________ ______________________> |
| |_INVALID__ _____ __imperative-statement-1_| |
| |_KEY_| |
| |
| >__ ______________________________________________ __________________> |
| |_NOT INVALID__ _____ __imperative-statement-2_| |
| |_KEY_| |
| |
| >__ _____________ __________________________________________________>< |
| |_END-REWRITE_| |
| |
|________________________________________________________________________|
MOVE identifier-1 TO record-name-1.
REWRITE record-name-1
The MOVE is performed according to the rules for the MOVE statement
without the CORRESPONDING phrase.
After the REWRITE statement is executed, the information is still available in identifier-1 (See "INTO/FROM Identifier Phrase" under "Common Processing Facilities" in topic 6.1.8.9).
Subtopics:
© Copyright IBM Corp. 1991, 1998
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.