UPDATE.RECORD - Visual Mode
UPDATE.RECORD runs in visual mode if the command line contains no field/value specifications.
Visual mode presents a full screen display of the external (converted) form of fields from a data record. Changes are made by moving the cursor to the desired position and entering or deleting characters. Modified lines are converted back into their internal form within UPDATE.RECORD when the cursor is moved to a new line or when the data is to be written back to the file.
1: NAME : Site Name : Acme Software Limited
2: ADDRESS : Address : 42 High Street, Anytown
3: POSTCODE : Postcode : AN11 1XX
6: DATE.PAID : Date Paid : 12 Feb 98ý17 Mar 98
7: INVOICES : Invoices : 001763ý001966
8: LICENCES : Licences : 907881792ý1907881802ý1907881808
9: EXPIRED.LICENCES: Expired :
10: COUNTRY : Country :
11: CLASS : Class : 3
12: DEALER.SALES : Sales :
13: CALLBACK.DATE : Callback : 01 Jul 98
14: CALLBACK.TEXT : Callback note: Interested in new product range
15: VAT.NO : VAT no : 614 1210 25
16: SITE.TEXT : Site text : Acme Software
17: CONTACT : Contact : Anne McIntosh
18: POSITION : Position :
19: TEL.NO : Tel no : 01234-56789ý01234-64526
20: FAX.NO : Fax no : 01234-21767
21: MOBILE.NO : Mobile no :
22: EMAIL : E-mail : email@example.com
23: SALES.TOTAL : Sales : £12783.33
24: NOTES : Notes :
<6,1,1> | D2DMYL[,A3] | 9R | PAYDATE | S |
By default, the display shows all fields for which a D-type dictionary entry or an A/S=type entry with no correlative exists. A specific subset of fields can be displayed by creating a dictionary phrase named @UPDATE.RECORD which lists the required fields (and possibly keywords).
For each field, the display shows:
The field number
The field name (unless suppressed by use of ID.SUP)
The display name (unless suppressed by COL.SUP)
The data in its external form
The last two lines of the screen are used as a status area. The upper status line displays the file name and record id. An asterisk is shown at the start of this line if the data has been changed.
The lower status line shows the field, value and subvalue in which the cursor is positioned and the dictionary conversion code, format code, association name and single/multivalue flag for the field. The final field of this status line shows a letter O if UPDATE.RECORD is in overlay mode (see below).
UPDATE.RECORD uses a subset of the default key bindings of the SED full screen editor. These all consist of keystrokes which are
Control shift + key
ESCape followed by another key
Ctrl-X followed by another key
The table below summarises the key bindings. All other keystrokes except for unused control shift codes cause the character to be inserted into the record text at the current cursor position.
UPDATE.RECORD also recognises the following terminal control keys:
Some functions are available using alternative key sequences. Such alternatives are shown above and in the descriptions that follow.
The repeat function (Ctrl-C or Ctrl-U) repeats the previous function.
The cancel function (Ctrl-G) can be used to abort partially entered incorrect key sequences and to terminate certain functions as described below.
Cursor Movement Functions
Note: A confirmation prompt appears if the cursor is moved from a line that contains a data conversion error.
Home (Ctrl-A or Home)
Moves the cursor to the start of the current line.
End (Ctrl-E or End)
Moves the cursor to the position after the last character in the current line.
Moves to the start of the first displayed field.
Bottom (Esc- >)
Moves to the start of the last displayed field.
Cursor down (Ctrl-N or Ctrl-P or Cursor down)
Moves the cursor vertically down one line. If this position is beyond the end of the data in the new line, the cursor is displayed immediately to the right of the final character. UPDATE.RECORD remembers the column position from which the cursor was moved so that a further vertical movement will continue to place the cursor at the lesser of its original column position and the end of the current line.
Cursor up (Ctrl-P or Ctrl-Z or Cursor up)
Moves the cursor vertically up one line. The same process is used for determining the column position as for the cursor down operation described above.
Cursor right (Ctrl-F or Cursor right)
Moves the cursor right.
Cursor left (Ctrl-B or Cursor left)
Moves the cursor left.
Page down (Ctrl-V or Page down)
Moves the cursor down by one screen or to the last line.
Page up (Esc-V or Page up)
Moves the cursor up by one screen or to the first line.
Prompts for a field, value and subvalue position and moves the cursor to that position. The position may be specified as:
Fields may be specified by number or name. Omitted field or value components mean " within the current field/value" unless a higher level component is specified in which case the default is 1. For example:
An asterisk can be use to imply "no change". This is useful when processing associated multivalued fields. For example:
If the specified value or subvalue does not exists, UPDATE.RECORD will offer to create it.
Data is inserted at the current cursor position. If overlay mode is set the new data overwrites any existing data at this position, otherwise it is inserted before the character under the cursor. Overlay mode may be toggled using the overlay function (Ctrl-O or Ctrl-X O or Insert).
Any character other than a field mark or item mark may be inserted. The quote character function (Ctrl-Q or Esc-Q) allows insertion of non-printing characters. It may be used in four ways:
Followed by a number of up to three digits, it inserts the character with that decimal ASCII sequence.
Followed by X and a hexadecimal number, it inserts the character with that ASCII or Unicode sequence. The number of digits is limited to 2 on non-ECS systems, 4 on ECS systems.
Followed by V, S or T, it inserts a value mark, subvalue mark or text mark respectively.
Followed by any other character, usually a non-printing character, it will insert that character.
Copying, Deleting and Restoring Data
Delete char (Ctrl-D or Del, Delete)
The character at the current cursor position is deleted.
Backspace (Backspace or Ctrl-H)
The backspace function removes the character to the left of the cursor.
Kill line (Ctrl-K)
The kill line function deletes all characters following the cursor.
The copy copies part of a field to the clipboard buffer. The required sequence of actions is:
Position the cursor on the first character to be copied.
Execute the mark function (Esc-.).
Position the cursor after the last character to be copied. Where the terminal device allows, the selected characters will be highlighted.
Press the copy key.
The copy function can be cancelled using the cancel function (Ctrl-G).
The cut function cuts (deletes) part of a field, placing a copy of the deleted text in the clipboard buffer. The required sequence of actions is:
Position the cursor on the first character to be cut.
Execute the mark function (Esc-.).
Position the cursor after the last character to be cut. Where the terminal device allows, the selected characters will be highlighted.
Press the cut key.
The cut function can be cancelled using the cancel function (Ctrl-G).
Paste (Ctrl-Y or Esc-Y)
The paste function inserts a copy of the clipboard buffer as set using copy or cut at the current cursor position.
Save (Ctrl-X S or Ctrl-X Ctrl-S)
The save function saves the modified data record. UPDATE.RECORD remains in the current record allowing further changes if required.
The save function cannot be executed if the current line contains a data conversion error.
Quit (Ctrl-X C or Ctrl-X Ctrl-C)
The quit function moves to the next record to be processed (if any). A confirmation prompt is displayed if the current record has been modified and not saved.
Expand char (Ctrl-X =)
Certain control characters (e.g. tab, form feed) are represented on the screen by question marks. The expand char function displays the character sequence number for the character at the cursor position on the lower status line.
The command function allows executing of any valid QM command from within UPDATE.RECORD. In addition, it supports the following built-in commands: