Data editing > Data correction > On-line data correction
 
On-line data correction
Quick reference
To allow interactive correction of errors, type:
online [label_number]
at the point at which you want to make corrections. label_number is the label of the statement to execute when the record is returned to the main edit with an rt command. The default is to return to the start of the edit.
More information
On-line correction is a method whereby Quantum interrupts processing when incorrect records are found, so that corrections, if any, may be made interactively. The record may then be re-edited to check for further errors straight away.
When an incorrect record is found, the current contents of the C array are written to the print file, out2, as usual, and a message is displayed on your screen indicating the record’s position in the data file. Any messages associated with the write or require statement finding the error are also displayed, and you then have the opportunity to accept the record as it is, reject it, correct it or re-edit it. The record itself is not displayed unless you request it.
To use this facility, enter:
online
in the edit at the point you want to be able to correct records.
You can put in as many online statements as you like, but as long as there is one online statement in the edit, on-line editing will be possible both at the point where the statement occurs and also at the end of the edit. If there are no errors to be corrected, Quantum ignores the online statements.
Once an incorrect record has passed through the on-line edit, you can leave it to continue through the rest of the standard edit until it reaches the end statement or you can return it to the start of the edit to be retested. If you prefer, you can name a statement to which records should return by giving that statement a label number and following online with that number. For example:
online 45
returns records to statement 45 rather than the start of the edit.
Note Runs containing on-line edits must be run from a terminal rather than in the background until the edit section is finished; otherwise you will not know when there is a record awaiting correction.
Any corrections made during on-line editing are effective only during the current run unless your edit contains one of the commands split or write to create a new data file. If your program calls the on-line editor but does not contain split or write, a warning message is displayed when your program is checked.
See also
Data correction