Using line commands
You can manipulate entire lines in an edit session by entering
the following line commands:
- d – delete the line
- i – insert a blank line
- r – repeat the line on the next line
- c – copy the line anywhere in the data
- m – move the line anywhere in the data
- a – after this line (used with copy and move)
- b – before this line (used with copy and move)
You can type line commands anywhere in the line number. d00004,
or 0d0004, or 00000d are
valid examples.
Adding a number directly after a line command causes the command
to affect the number of lines specified. The following example deletes
the next three lines.
d30002
00003
00004If you typed 0 over the 0 after the 3, you would delete 30 lines (or the rest of the file if it contained fewer than 30 more lines).
To manipulate unnumbered blocks of lines, double the line command
on the first and last line of the block. The following example deletes
a block of lines.
dd0001
000002
dd0003| Exercise |
|---|
| Display the edit panel with the text you typed in the previous exercise. Then do the following by using line commands and pressing the Enter key:
When you are finished, if you did not press the Enter key twice after step 4, your screen looks like the following panel. When you press the Enter key a second time, the inserted lines disappear because you didn't type anything in them. To save the data and exit the data set, press the END PF key (PF 3). |
EDIT ---- PREFIX.SAMPLE.TEXT ----------------------------------- COLUMNS 007 078
COMMAND ===> SCROLL ===> HALF
****** ************************ TOP OF DATA ************************************
000001 This is the first line.
000002 And this is the next one.
000003 This line is special and should be duplicated.
000004 This line is special and should be duplicated.
'
'
'
'
'
000005 This line belongs at the end.
****** *********************** BOTTOM OF DATA **********************************