Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

REWRITE statement

The REWRITE statement replaces a record in an UPDATE file. For SEQUENTIAL UPDATE files, the REWRITE statement specifies that the last record read from the file is rewritten; consequently a record must be read before it can be rewritten. For DIRECT UPDATE files, any record can be rewritten whether or not it has first been read.

Read syntax diagramSkip visual syntax diagram>>-REWRITE FILE--(file-reference)--+-------------------+-------->
                                   '-FROM--(reference)-'
 
>--+-------------------+--;------------------------------------><
   '-KEY--(expression)-'
 

The keywords can appear in any order. The FROM option must be specified for UPDATE files with the DIRECT attribute, or with both the SEQUENTIAL and UNBUFFERED attributes.

A REWRITE statement that does not specify the FROM option has the following effect:


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)