The @PREFIX statement is used to insert a string as a prefix in front of every line or string variable in each specified range (see also @SUFFIX).
Operation | Operands | F mode, L mode |
@PREFIX | { lines | svars } [,...] W ITH string |
lines | One or more line ranges in which text is to be inserted at the start of each |
svars | One or more ranges of string variables in which text is to be inserted at the |
string | String that is to prefix each line or string variable in each specified range. It The string is converted into the character set used by the work file or string |
If inserting the string would cause a line or string variable to exceed the maximum record length of 32768 characters then it is not inserted and the message EDT5474
is output.
If errors occur during processing (EDT5453
or EDT5474
) then the statement is aborted. Any lines and/or string variables which have been successfully modified up to this point retain their changes.
If the statement is interrupted with [K2] and the EDT session is continued with /INFORM-PROGRAM
then the processing of the statement is aborted and message EDT5501
is output.
Example
The string ONCE
is to be inserted as a prefix in the line range 4-5.
The content of line 1 is to be inserted as a prefix in the line range 4-5.
Five blanks are to be inserted as a prefix in the line range 4 to 5.
The content of line 4 is to be inserted as a prefix in the line range 4-5.