Moving records
You can rearrange the display of your records by moving them up or down in the data set. For record types other than KSDS, the new sequence of the records is stored when you save the data set. In a KSDS, moving records while editing changes the displayed position of records, but has no effect on the stored data set. For this reason, the Move prefix commands as described in the following are not available for a KSDS. If you want to change the order of records in a KSDS, you must change the key values.
To move records within a data set:
- Position your cursor in the prefix area of the first record that you wish to move.
- Type the M or Mn prefix command, where n represents the number of records to be moved, or type MM on the first of a block of records to be moved and MM in the prefix area of the last record in the block.
- Press Enter. The prefix command is highlighted and the message "Prefix command pending" is displayed in the upper right corner of your screen.
- Move your cursor to the prefix area of the record where you would like to place the moved records.
- Type one of the following prefix commands:
- A
- This command inserts the moved records after the current location.
- B
- This command inserts the moved records before the current location.
- Press Enter. The records are removed from their previous location and inserted at the new position.
Note: When you move records with the M, Mn, or MM prefix
commands, instead of moving the data after or before
other records, you can choose to overlay the moved records
on existing records in the data set you are editing.
For details, see Overlaying data in existing records.