Editing a Map

This section describes the screen modes and commands available for editing a map.


Screen Modes

The map editor begins an editing session always in split-screen mode. In split-screen mode, the upper half of the map editor screen contains data definitions of other Natural objects (as described in Selecting Data Definitions) and/or the current delimiter settings, and the lower half of the screen contains the editing area as shown in the example below:

  Ob _                                    Ob D CLS ATR DEL     CLS ATR DEL     
   .                                       .     T  D    Blnk    T  I    ?      
   .                                       .     A  D    _       A  I    )      
   .                                       .     A  N    ¬       M  D    &      
   .                                       .     M  I    :       O  D    +      
   .                                       .     O  I    (                      
   .                                       .                                    
   001   --010---+----+----+---030---+----+----+---050---+----+----+---070---+- 
                                                                                
                                                                                
                                                                                

                                                                                
                                                                                
  Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
        Help  Mset  Exit  Test  Edit  --    -     +     Full  <     >     Let

PF9 can be used to switch between full-screen and split-screen mode.

You can leave the map editing area by pressing PF3 or by entering a period (.) in the Ob input fields in the upper section of the screen.

PF Keys and Commands for Positioning

The PF keys and commands listed below can be used to invoke an editor function or navigate in the map editing area; you enter the commands at the beginning of a map line:

PF Key Command Explanation
PF1   Invokes the map editor help facility.
PF2   Displays/modifies the current map settings.
PF3 .Q Terminates map editing and returns to the Edit Map menu.
PF4   Tests the map definition.
PF5   Invokes the extended field editing function (see the relevant section) for the field at which the cursor is currently positioned.
PF6 .-- Moves to top of map.
PF7   .- Moves upwards half a window page.
.-nnn Moves upwards nnn lines.
PF8     .+ Moves downwards half a window page.
.+nnn Moves downwards nnn lines.
.++ Moves to bottom of map.
PF9 ./ Switches between split-screen and full-screen mode.
PF10     .< Moves to the left half a window page.
.<nnn Moves to the left nnn columns.
.<< Moves to the left border of the map.
PF11     .> Moves to the right half a window page.
.>nnn Moves to the right nnn columns.
.>> Moves to the right border of the map.
PF12     Ignores changes made on screen subsequent to last use of ENTER.
.* Moves top left corner to cursor position.

Line Commands

Line commands must be entered in the following form:

..line-command

where the two periods (..) represent two occurrences of the control character in effect for the map definition.

We recommend that you enter a blank at the end of each line command. This prevents the editor from attempting to interpret any information existing on the line as part of the line command.

The following line commands are available:

Command Explanation
..A Array table definition (see the section Array and Table Definitions).
..An Array table definition with n occurrences.

This command can be used to create a table with n occurrences vertically for all fields specified in the current line.

..C Centers a single line (that is, the line in which the command was entered).

Two ..C commands entered on the same screen center the first line and adjust the rest of the selected lines.

..Cn Centers the line and moves the n-1 lines below it accordingly.
..C* Centers the line and moves all lines below it accordingly.
..D Deletes a single line (that is, the line in which the command was entered).

Two ..D commands entered on the same screen delete the block of lines delimited by these commands.

..Dn Deletes the line and the n-1 lines below it.
..D* Deletes the line and all lines below it.

If the delete operation affects array elements, the array is deleted in total.

..E Invokes the Field and Variable Definitions - Summary screen of the Field and Variable Definitions function (see Functions in the Edit Map Menu) for all fields contained in the line.

Two ..E commands entered on the same screen display all fields within the range of lines delimited by these commands for possible extended field editing.

..En Invokes the Field and Variable Definitions - Summary screen of the Field and Variable Definitions function (see Functions in the Edit Map Menu) for the line and the n-1 lines below it.
..E* Invokes the Field and Variable Definitions - Summary screen of the Field and Variable Definitions function (see Functions in the Edit Map Menu) for the line and all lines below it.

The ..E commands display a screen with the name and Natural data format/length of the requested fields. The field names shown can be modified. The Cmd column can be used to select the required function: extended field editing, array definition and processing rule editing.

..Fc Fills the blank spaces of a line with the character c.
..I Inserts a single line.

The last blank line on the screen is deleted in order to allow for the line insertion.

..In Inserts n lines below the line in which the command was entered.
..I* Inserts as many lines as possible below the command line.
..J Joins the line in which the command was entered with the line below it.

Two ..J commands entered on the same screen joins the range of lines delimited by the commands.

..Jn Joins the line in which the command was entered with the n-1 lines below it.
..J* Joins the line with all lines below it.

If a join operation results in a line being too long, the lower line is split at the rightmost possible position and the left part is then joined with the previous line. The right part of the split line is then shifted to the left to align it with the line in which the command was entered.

..L Invokes the Modify INCDIR Statements of Map screen which can be used to list and update the INCDIR statements generated for map fields that were copied from DDMs (data definition modules). For detailed instructions, see Checking and Correcting References to DDMs.
..M Moves the line in which the command was entered below the cursor line.

If two ..M commands are entered on the same screen, the block of lines delimited by the commands is moved below the line marked with the cursor.

..Mn Moves the line and the n-1 lines below it below the line marked with the cursor.
..M* Moves the line in which the command is entered and all lines below it to the line below the line marked with the cursor.

This command is only practical if the line marked with the cursor is above the line in which the command is entered.

..P Invokes PF-key processing rule editing.

PF-key processing rules are special processing rules to define activities assigned to program sensitive PF keys.

..Pn Invokes PF-key processing rule editing for rank level n.
..P* Lists all processing rules defined for the PF keys in this map.
..Q Terminates map editing and returns to the Edit Map menu.
..R Repeats once all literal strings on the line in which the command was entered. The cursor position is used to indicate the target line.

If two ..R commands are entered on the same screen, the literal strings within the block of lines delimited by the commands are repeated.

..Rn Repeats all literal strings on this and the n-1 following lines. If the cursor is located below the command line, the same text is repeated n times.
..S Splits the line at the cursor position.

If two ..S commands are entered on the same screen, the block of lines delimited by the commands are split.

..Sn Splits the line where the command is entered and the n-1 lines below it at the cursor position.

Field Commands

Field commands must be entered in the following form:

.field-command

where the period (.) represents the control character in effect for the map definition. Each command must begin in the first position of a text or data field.

A field command can be applied to a range of fields or constants. A range can be specified in any of the following ways:

  • Two or more of the same field commands can be used on the same screen. The column range (horizontal range) and the line range (vertical range) are determined by the positions of the commands. (The Map Editor Tutorial provides examples which illustrate this.)

  • A repetition factor n can be used. It can be enclosed within parentheses. The command is applied to the designated field and also to the fields in the n-1 lines below it. A repetition factor * (asterisk) causes repetition until the bottom of the map is reached.

We recommend that you enter a blank at the end of each field command. This prevents the editor from attempting to interpret part of the field as part of the field command.

The following field commands are available:

Command Explanation
.A Defines an array. This command can be applied to a single field only and not to a range of fields.

The array definition (see Array and Table Definitions) is specified on the screen provided. The resulting array is positioned with its left upper corner at the position where this command was entered.

An array can be redefined by applying the .A command to one of its elements.

.An Supplies a repetition factor n with the .A command for the purpose of defining a one-dimensional array (no spacing, no offsets) without having to use a separate screen.
.C Centers a field or a range of fields between adjoining fields.

To center a single field, enter .C in the field to be centered.

To center a range of fields, enter .C in the first and last field to be centered, or enter .C in the first field and position the cursor to the last field to be centered.

In the event that an adjoining field or fields are not present, the column boundaries in effect for the map definition are used instead.

.D Deletes a field or a range of fields.

To delete a single field, enter .D in the field to be deleted.

To delete a range of fields, enter .D in the first and last field to be deleted. The field range to be deleted may extend beyond a single line. If an array element is deleted, the entire array is deleted.

.E Invokes the extended field editing function (see the relevant section) for the field at which the cursor is currently positioned. This command can be applied only to a single field and not to a range of fields.

Extended field editing can also be invoked by positioning the cursor to the selected field and pressing PF5.

.J Joins fields located on consecutive lines.

The left boundary of the join operation corresponds to where the .J command is entered and the right one corresponds to the cursor position.

.M Moves a field or a range of fields.

To move a single field, enter .M in the field to be moved and place the cursor at the target position.

To move a range of fields, enter .M in the first and last field to be moved and place the cursor at the target position.

.P[n] Edits processing rules (see the relevant section) for a field.

Supply a parameter n with the .P command to indicate the priority (rank) of the processing rule to be edited. If necessary, the value specified for n can be enclosed in parentheses (()).

.R Repeats (copies) a field or a range of fields.

To copy a single field, enter .R in the field to be copied and place the cursor at the target position.

To copy a range of fields, enter .R in the first and last field to be copied and place the cursor at the target position.

Repetition is always done downwards and from left to right. Fields generated by this command are assigned a dummy name. A valid name for each such field must be defined by using the post assignment function or the extended field editing function (see the relevant section).

Note:
Arrays cannot be copied.

.S Splits (moves) a line or a range of lines.

Enter .S in the field at which splitting is to begin and place the cursor at the target position. The line is divided at the position where the .S command was entered. The right portion is then moved to the cursor position.

.T Truncates (deletes) a field or a range of fields from a line.

Enter .T in the field at which truncation is to begin. If this command is used to truncate (delete) an array element, the entire array is deleted.