Use the ADD subcommand to insert lines immediately after the current line.
Operands
n
is the number of lines you want to add. If n is not specified, one
line is added.
Usage Notes
You can enter data in the newly-added lines at any time during the editing session. These lines
remain in the file after it is saved or filed.
If the current line is the End of File line, the lines are added before this line.
Examples
Figure 1 shows a before-and-after example of the ADD subcommand. In this example,
four lines are being inserted after the current line (line 2).
Figure 1. ADD Subcommand — Before and After
ANIMALS FACTS A1 F 80 Trunc=80 Size=3 Line=2 Col=1 Alt=0
00000 * * * Top of File * * *
00001 THE ARMADILLO IS THE ONLY ARMORED MAMMAL.
00002 THE LION ROARS TO ANNOUNCE POSSESSION OF A PROPERTY.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7
00003 STINGAREES, FISH FOUND IN AUSTRALIA, CAN WEIGH UP TO 800 POUNDS
00004 * * * End of File * * *
====> add 4
X E D I T 1 File
ANIMALS FACTS A1 F 80 Trunc=80 Size=7 Line=2 Col=1 Alt=1
00000 * * * Top of File * * *
00001 THE ARMADILLO IS THE ONLY ARMORED MAMMAL.
00002 THE LION ROARS TO ANNOUNCE POSSESSION OF A PROPERTY.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7
00003 _
00004
00005
00006
00007 STINGAREES, FISH FOUND IN AUSTRALIA, CAN WEIGH UP TO 800 POUNDS
00008 * * * End of File * * *
====>
X E D I T 1 File
Responses
If SET IMAGE ON is in effect, the cursor moves to the first tab column of the first line that was
added. Otherwise, it is placed in column 1.
By default, the prefix areas associated with the added lines are highlighted. For more information, see SET COLOR (PENDING).
Each line that is added is prefilled with the current mask (see
SET MASK).
The line pointer remains unchanged.
Messages and Return Codes
520E
Invalid operand: operand [RC=5]
543E
Invalid number: number [RC=5]
557S
No more storage to insert lines [RC=4]
where return codes are:
0
Normal
4
Insufficient storage to add lines
5
Invalid operand or number
6
Subcommand rejected in the profile due to LOAD error, or QUIT subcommand has been issued in a
macro called from the last file in the ring