Insert

PurposeINSERT allows new lines to be entered at a specified location and supplies line numbers for the new lines.

Syntax

I/NSERT/ [/AT/ line] [BY incr]

/AT/line

specifies the line after which new lines will be inserted.  If this option is omitted, new lines are inserted after the current line.  If INSERT is given in an empty object, ACCENT R begins numbering at 100 by default.  The default beginning number can be changed by setting a different value to the system field @LINE_START.

BY incr

specifies the value by which new lines are to be incremented.  A comma (,) can be used instead of BY.  The default increment value, if this option is not included, is 10.  The default increment value can also  be changed by setting a different value to the system field @LINE_INCR.

Example

In the following example, note that ACCENT R has renumbered the last line so that it follows inserted lines.

*MODIFY SD DISCOUNTS_DBM2
--PRINT
00010  DISCOUNT_TYPE,CHAR,40
00020  STORE_CODE,CHAR,4
00030  LO_QTY,INT,6
00040  HI_QTY,INT,6
00050  DISCOUNT,FLOAT,3
--INSERT AT 10 BY 5
00015  CONTRACT,CHAR,40
00020  CO_CODE,CHAR,4
00025  LOW_AMT,INT,6
00030  MID_AMT,INT,6
--PRINT
00010  DISCOUNT_TYPE,CHAR,40
00015  CONTRACT,CHAR,40
00020  CO_CODE,CHAR,4
00025  LOW_AMT,INT,6
00030  MID_AMT,INT,6
00040  HI_QTY,INT,6
00050  DISCOUNT,FLOAT,3
--SAVE

NOTES:  The INSERT mode is terminated by typing Control-Z as the first entry on a new line or by typing END on a new line.

If necessary, INSERT mode renumbers existing lines so that they follow all inserted lines. INSERT does not delete or replace any existing lines.

Text may also be entered by typing a line number and the line of text.  However, if you enter a line number that already exists, the new line will replace the old line.

SLIM may be invoked to edit the last line edited or a previous editing command by entering Control-V Control-V.

Line length can be controlled through the system field @TERM_LINE.  This can be change at the command level with the set command to a maximum of 4095.