Data editing > Data correction > On-line editing commands > Correcting records
 
Correcting records
Quick reference
To overwrite the current contents of a column or field with a new code or string, type:
[s] column(s) codes
To insert additional codes into a column or field, type:
e column(s) codes
To delete codes from a column or field, type:
de column(s) codes
In all cases, columns are defined as numbers only, without c or parentheses.
More information
The words used for correcting records are set, emit and delete which are usually abbreviated to s, e and de. They work in the same way as their counterparts in the ordinary edit section: overwrites the original contents of a column or field with new information; e appends a single code to the codes that are already in a column and de removes one or more codes from a column leaving the remainder intact.
There are many variations of these commands, all of which are equally correct. Choose the one that you find most convenient. Here are some examples. The first group are set statements for overwriting the contents of a column or field with the given code or string of codes.
set c5'7'
s c5=7
s 5=7
s 5 7
set c9'45&'
s c9=45&
s 9='45&'
s 9 '45&'
set c(123,126)=$4567$
s 123,126=4567
s 123,126 $4567$
To overwrite a single column with a single code, use one of the four formats on the first line. In all cases, you can type in the full command word (set) or the abbreviation (s). All four variations replace whatever is currently in c5 with a code 7.
The examples on the second line are for overwriting a single column with a multicode. Notice that if you use the = notation, the single quotes enclosing the multicode are optional.
The last line illustrates how to overwrite a field of columns with a string: in this case, to replace the current contents of columns 123 to 126 with the codes 4, 5, 6 and 7 respectively.
In all online set statements you can omit the set or s at the beginning of the command, thus:
c5=7
9='45'
123,126 $4567$
When it comes to adding codes to columns, the on-line editor has an option that the ordinary editor does not. Whereas the ordinary emit statement only allows you to specify single columns, the on-line editor also allows you to emit strings of single-codes into a field of columns. Thus, the syntax of the online emit statement is:
emit c321'7'
e 321=7
e 321 7
emit c(16,17)=$77$
e c(16,17) $77$
e 16,17 77
The same notes apply to deleting codes: the online edit allows you delete codes from a single column or a field:
delete c123'7'
de c123 7
de c123 7
delete c54'34
de c54 '34'
de 54 34
delete c(16,17)=$77$
de c(16,17) $77$
de 16,17 77
Note In the examples above, the c, equals sign, single quotes and dollar signs are optional as long as the components of each statement are separated by spaces. Additionally, in assignments, set (or s) is optional.
Whenever you alter columns with set, emit or delete, the on-line edit checks that the columns you are editing are within the range of the C array for the current job. If you are using the default array of 1,000 cells, c1001 and above are out of range for editing.
See also
On-line editing commands