The MODIFY command enters the QM record modification processor.
Format
MODIFY {DICT} file.name { field list } { id.list }
where
DICT | indicates that the dictionary portion of the file is to be modified. |
file.name | is the name of the file to be modified. |
field.list | is the list of field(s) to be modified. Each entry must correspond to a D-type dictionary entry. These name may alternatively be a PH (phrase) type entry which will be expanded and all fields referenced by the phrase will be modified. If no fields are specified on the command line, MODIFY looks for a phrase named @MODIFY and, if found, uses this as the source of field names. If no @MODIFY phrase exists, MODIFY will use the @ phrase or, if this also does not exist, a default list of fields is constructed from the dictionary. |
Items appearing on the command line or in the @MODIFY or @ phrase which are not D-type dictionary entries or phrases are ignored.
Field names may be followed by "VERIFY filename". In this case, MODIFY will check that data entered into the named field is a record id in the named file.
id.list | is the list of records to be modified. An item is assumed to be a record id if it is not a field name defined in either the dictionary or the VOC, or if it is enclosed in quotes. If no id.list is specified, MODIFY uses the default select list or, if that is inactive, prompts for record ids. |
The MODIFY command provides a data editor which uses the dictionary associated with a file to determine the format in which data is displayed or entered and to provide prompts in terms which relate to the data. It is useful for making changes to existing records or entering new data. MODIFY is particularly suited to entry of dictionary records where the prompts remove the need to remember the meaning of each field.
MODIFY prompts for a record id or uses the next item from id.list or the default select list. Entry of a question mark (?) at the id prompt will display a pick list of record ids.
If the record already exists, a list of modifiable fields is displayed. This list contains one entry for each single valued field followed by an entry for each multi-valued field or associated set of fields.
The prompt displayed with the list allows the following responses:
item no | Entry of an item number from the list selects that field or association for modification. Data may be entered or modified in a panning input area at the bottom of the screen. The edit keys available are: |
Ctrl-A or Home | Position cursor at the start of the data |
Ctrl-E or End | Position cursor at the start of the data |
Ctrl-B or Left | Move the cursor left one character |
Ctrl-F or Right | Move the cursor right one character |
Ctrl-D or Del | Delete the character under the cursor |
Backspace | Delete the character to the left of the cursor |
Ctrl-K | Delete all characters from the cursor position onwards |
Ctrl-O or Ins | Toggle overlay / insertion mode |
Ctrl-Q | Quote character. The next character is inserted without interpretation as a command. If the character is V, S or T, a value, subvalue or text mark is inserted. |
Return | Accept the entered data |
Ctrl-X | Abort entry, returning to the field list |
Non-printing characters can be inserted using the Ctrl-Q prefix shown above or by typing ^nnn where nnn is the ASCII character number of the character to be inserted.
As fields are modified, their values are inserted into the displayed list of fields.
FI | Writes the modified record to the file and prompts for a new record id. If the record was a dictionary I-type or C-type, MODIFY will compile it. |
Q | Quits from the record, discarding any changes and prompts for a new record id. |
N | Displays the next page of fields available for modification. |
P | Displays the previous page of fields available for modification. |
? | Displays a brief expansion of the available options. |
Selecting a multi-valued field or an association enters a separate display screen showing one line for each value in the field(s).
The prompt displayed with the list allows the following responses:
line no | Entry of a line number from the list selects that value set for modification. Data may be entered or modified for each field in the association in turn in a panning input area at the bottom of the screen. The edit keys available are as above. |
Dn | Deletes the value set at line n. |
In | Inserts a new value set at line n. |
E | Extends the values, repeatedly accepting new data until either a null entry is made in the first field of the association or the exit key (Ctrl-X) is used. |
N | Displays the next page of values available for modification. |
P | Displays the previous page of values available for modification. |
? | Displays a brief expansion of the available options. |
Where the record does not already exist, MODIFY prompts for data for each field in turn and then allows changes as for an existing record.
When editing a dictionary, MODIFY automatically chooses the editable fields based on the record type.
|