REWR Rewrite Command for multiple Update

The SUF and BAK options may not be specified together.

The Write file can be processed by either the CFS Editor (Action Code M), or by EDT.

The Write file records can be up to 2040 bytes in length (PAM blocks, Format B type records of PLAM library elements).

Before modifying the Write file, the original file should be saved.

Rewrite Error Handling

If an error occurs with one of the desgnated files/library elements during the Rewrite, then all records belonging to this data object are taken from the input file (REWR file), and written to an error file with the name file.ERR. Thereafter, the Rewrite continues with the next data object. After the user has resolved the error, a new Rewrite process can be executed for only those unsuccessful elements as follows: REWR file.ERR.

A common error when processing the Rewrite file can occur if the EDT command @ON&C'...'T'...' also changes control information in a record, such as the file or library element name. To avoid these kind of problems, it is recommended that all records with control information necessary for Rewrite should be copied to another workfile (ON&:2-2:FIND'*'COPY TO (1) KEEP). After processing the data content correctly, copy the control information back to its original position (COPY &(1) ).

If the temporary file created by the Rewrite cannot be copied back to the original file for any reason, then a message will be written to the Rewrite error log, and the temporary file (Name = inputfile. REWR) will not be erased.