Managing the prefix area

The prefix area displays line numbers that represent the record number of each line in the data set being edited.

The prefix area also doubles as the prefix command entry area. You enter prefix commands by overtyping the line number for the appropriate record.

You can use prefix commands to:
  • Insert or delete lines
  • Repeat (duplicate) lines
  • Move lines
  • Shift data
  • Limit the data being edited
The prefix area also serves to:
  • Highlight unidentified segments when you are working with segmented records with related ID criteria.
  • Identify records not selected because of invalid length when you are working with variable-length arrays.
  • Indicate why a record is not selected in an editor session.

Related topics

In an editor session, to see which prefix commands are valid for the current environment, enter an "?" in the prefix area (against any listed line). File Manager displays a list of the line commands you can enter, like those shown in Figure 1.
Figure 1. Using the ? prefix command to display a list of valid prefix commands
  Process   Options   Utilities   Help
                  File Manager Available Edit Prefix Commands
                                                                    More:     +

 You can enter the following commands in the prefix area of the data display:

 A     identifies the record after which data is to be moved or copied.

 B     identifies the record before which data is to be moved or copied.

 BND   place a bounds record here to show current editor bounds.

 C     copy one record.
 Cn    copy n records.
 CC    copy block of records. Mark start and end of block.

 COLS  Use COLS to display the columns line.  For example:

          000300
          cols   ----+----10---+----2----+----3----+----4----+----5---    etc.
          000500

 Command ===>                                                                  
  F1=Help      F2=Split     F3=Exit      F4=CRetriev  F7=Backward  F8=Forward
  F9=Swap     F10=Actions  F12=Cancel

In an editor session, you can choose whether a prefix area is displayed next to the data or not.

To specify the default position and display state of the prefix area for all editor sessions, set these editor options on the relevant Editor Options panel:
  • Display prefix area
  • Display prefix area on the right
  • Prefix area width (A,6,7,8,9)
To specify the default position and display state of the prefix area for the current editor session, use the PREFIX primary command. For example:
  • To display the prefix area on the right, enter PREFIX RIGHT.
  • To display the prefix area as an 8-digit field, enter PREFIX 8.
  • To display the prefix area with a width that automatically adjusts (from 6 to 9 digits wide) in order to display the record number, enter PREFIX A.
  • To remove the display of the prefix area, enter PREFIX OFF.

You can use most prefix commands on either a single line or a block of consecutive lines:

  • To perform an operation on a single line, you enter the appropriate prefix command.
  • To perform an operation on a block of consecutive lines, either enter the prefix command preceded or followed by the number of lines, or enter the appropriate block prefix command at the start and end lines of the block.

Generally, you need to type over only the first 1 or 2 characters of the line number to enter a prefix command. Sometimes, however, typing a single character can be ambiguous. In the following example, it is unclear whether the intended prefix command is R to repeat line 31700, or R3 to repeat the line three times:

031600
R31700
031800

In such cases, the editor assumes that you have not typed a number following the prefix command. If you want to repeat the line three times, you can use any of the following methods:

  • Type one or more blanks following the R3:
    R3 700
  • Type R3 and press the Erase EOF key to clear the rest of the Line Command field, or press the Erase EOF key and then type R3.
  • Type one or more blanks after the R but before the number such that the number when entered is different than the characters being overtyped.:
    R 3700
  • Type the number before the R, ensuring that the number when entered is different than the characters being overtyped:
    3R1700

To clear any outstanding commands in the prefix area, use the RESET PREFIX command. See RESET primary command.

Prefix commands do not affect not-selected or suppressed records that are hidden from display or represented by shadow lines. For example, if you use the MM prefix command to mark a block of records for moving, then not-selected or suppressed records that are hidden from display or represented by shadow lines are not affected by the move, and are left behind at their original position. Prefix commands do affect excluded records, even when they are hidden from display (by SHOW EX OFF and SHADOW EX OFF).

Related topics