![]() |
INS Insert Columns
The string item is inserted from column :col: to a length len in n records, beginning with the first record in the display.
n Number of records: 1 <= n <= 99999. Standard: n = 1. The insertion is performed only on the first record in the display. The character '$' instead of a number n indicates the highest possible number 99999
:col: 1 <= col <= 32000 | col = $ (End of the record).
Column from which the insertion should take place. If INS..., :$: ... is specified, the insertion will take place at the end of the record.
Standard: The insertion begins immediately after the ISAM key. This will be column :9: for files with KEYPOS=5 und KEYLEN=8.
len Length of the string to be inserted. Standard: len = length of the item, or len = 1 if item is not specified.
item String to be inserted: C'string' | X'string'. C'string' can also be abbreviated to 'string'. If item is shorter than len, then item will be repeated until it reaches the length specified in len. If item is longer than len, then only those first few positions of item will be inserted.
Standard: C'_', i.e. instead of a specific string, blanks will be inserted.
Examples:
INS 9999,:500:10 X'FF'
Beginning with the first record in the display, the character string X'FFFFFFFFFFFFFFFFFFFF' (=10X'FF') is inserted from column 500 in 9999 records, or to the end of the file.
INS :$:'1234567890'
The character string C'1234567890' is appended to the end of the first record in the display.
INS :20:10
10 spaces from the 20th column are inserted into the first record in the display.