The ap command appends a string of characters to the end of one line, or to the ends of all consecutive lines within a range.
ap [n] /string/
|n||Number of lines starting with the current line. If n is not included, string is appended to the current line only.|
|string||String of characters to append to the lines.|
|/||Commonly used as the delimiter, but any non-numeric character may be used as long as it is not included in the string. The second delimiter is not needed unless spaces are to be appended at the end of the line.|
The ap command displays all lines to which it appends string, and moves the line pointer to the last line in the range indicated by n.
The x command cancels an ap command, provided the ap command was the last command to modify a line.
|i||Inserts one or more lines.|
|x||Cancels the last text-modifying command.|
This example appends the string (SALES=1,MARKETING=2) + to the current line:
002 OENTER YOUR DEPT. NUMBER .AP/(SALES=1, MARKETING=2)+ 002 OENTER YOUR DEPT. NUMBER(SALES=1,MARKETING=2)+ .