Changing data using prefix commands

In a File Manager/Db2 View or Edit editor session, you can enter prefix commands in the prefix area of one or more rows on the display. The prefix area is typically represented by a column of 6-digit numbers on the far left or far right of your display.

You can use prefix commands to:
  • Insert or delete rows
  • Repeat (duplicate) rows
  • Move rows
  • Overlay data in one or more rows with data from one or more other rows
  • Shift data
  • Copy or move rows to and from a clipboard
  • Limit the data being edited

To set the position of the prefix area (left or right), or turn the prefix area on or off, use the PREFIX primary command.

You can use most of the prefix area commands on either a single row or a block of consecutive rows:
  • To perform an operation on a single row, you enter the appropriate command code.
  • To perform an operation on a block of consecutive rows, either enter the command code preceded or followed by the number of lines, or enter the appropriate block command code 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 (it cannot detect if you overtype a character with the same character). If you want to repeat the line three times, you can use any of the following procedures:

  • 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 primary command.

Note: Moving rows in a File Manager/Db2 editor session does not affect the order in which the rows are stored in the underlying Db2® table.