Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@COLUMN - Insert text and delete blanks at end of line

&pagelevel(3)&pagelevel

The @COLUMN statement modifies the content of existing work file lines or string variables.

During the first stage, new text is inserted or existing text is overwritten as of the specified column. Then all the blanks are deleted (as far as the next character which is not a blank) from right to left starting at the last character in the work file line or string variable. A work file line which only consists of blanks remains present as an empty line in the work file. A string variable which only contains blanks becomes an empty string variable after the delete operation.

Operation

Operands

F mode, L mode

@COLUMN

col  ON  {lines | svars} [,...] [ {   CHANGE  |  IN SERT} ] [:] string

col

lines

Column as of which text is to be replaced or inserted.

One or more line ranges in which text is to be inserted or replaced. Only
existing lines are processed.

svars

One or more ranges of string variables in which text is to be inserted or
replaced.

CHANGE

The string specified with string replaces the existing text as of column col
(default value).

INSERT

The string specified with string is inserted as of column col.

:This specification is obligatory if neither CHANGE nor INSERT is specified in order to clearly separate the range specification from the string.
string

String which is inserted or which replaces existing text as of the specified
column in every line of a specified line range. It is also permissible to specify
an empty string.

The string is converted into the character set used by the work file or string
variable. If the string contains characters which cannot be displayed in the
target character set then these are replaced by a substitute character if such
a character has been specified.
(see @PAR SUBSTITUTION-CHARACTER); otherwise, the @COLUMN
statement is rejected and the error message EDT5453 is issued.

       

If the column as of which the text is to be inserted is located after the previous line end then the intervening columns are filled with blanks.

No text is replaced or inserted if this would cause the work file or string variable line length to exceed the permitted maximum of 32768 characters. Instead, in this case, the message EDT5474 is output. EDT does not check whether deleting blanks at the end of a line would restore the line to a permitted value.

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.

Note

This statement can be used to delete blanks at ends of lines without knowing the line length. If an empty string is specified as the replacement text in the @COLUMN statement then no text is replaced in the lines. The right-to-left delete operation causes blanks to be deleted at the ends of the lines.

Example

The content of column 2.00 is to be entered in line 1.00 as of column 3. The old content of line 1.00 is therefore overwritten.

The string 567 is to be inserted in line 1.00 as of column 5. Consequently, no characters are overwritten in line 1.00.

1.00 123456780<······························································
2.00 348<····································································
3.00 ········································································