Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@TABS (format 2) - Define and output software tabs

&pagelevel(3)&pagelevel

Format 2 of the @TABS statement is used to define tabulator (tab) characters and positions for positioning with the software tabulator, output the corresponding current values and activate and deactivate the software tabulator.

If software tabulators have been activated then tabulator expansion is performed when data lines are input from a terminal (not in batch mode or on input from procedures) in L mode (including indirect input via the text operand in certain statements) or when EDT
enters/modifies data lines in the F mode data window. If the software tabulator has been defined (although not necessarily activated), then @TABS (format 3) can be used to perform tabulator expansion for existing lines. Tabulator expansion is performed from left to right in the data lines and it is possible to set two expansion strategies.

The normal forward strategy causes a tab character to be replaced by blanks (at least one) until the following character is located at the next tab position to the right of the current position.

The somewhat unusual positioning strategy causes the nth tab character to be positioned at the nth tab position irrespective of whether this is located to the left or the right of the current position. If it is located to the right of the current position then the tab character is replaced by the corresponding number of blanks in the same way as in the forward strategy. In contrast, if it is located to the left of the current position (or exactly at it) then the tab character is deleted and the current position is set to the tab position. Any following characters then usually overwrite any preceding characters in the entered line. The user can request a message to be output when this occurs.

In both strategies, any tab characters for which no further tab positions can be ascertained are not replaced and are retained as normal text characters.

The settings for the software and hardware tabulator are stored separately.
However, only one of the two tabulator functions can be active at any time. If the software tabulator is activated then any hardware tabulator that may be active is therefore deactivated.

Operation

Operands

F mode, L mode

@TABS

: : { [char [:] col [,...] ] [ {CHECK | FORWARD | NOCHECK} [col1] ]

| ON
| OFF
| VALUES } 

char

Character that EDT is to interpret as a tab character in subsequent input.
This implicitly activates the software tabulator. Neither the statement
symbol nor the separator character should be specified as the tab character.
The character ; cannot be used when statements are entered in F mode
since it is interpreted as a statement separator. The tab character char
must be separated from col by a : if char is one of the characters C, F, O,
V, N or a digit.

If char is not specified but a strategy is then only the strategy is modified.

If neither char nor a strategy is specified then the current settings for the
software tabulator are set to undefined and the software tabulator is deactivated.

col

Specifies the comma-separated tab positions for positioning with the tab
character. The number of possible tab positions is only restricted by the
length of a statement. If the tab positions are not specified in ascending
order then the @TABS statement is not executed and the error message
EDT4940 is issued.

CHECK

EDT uses the positioning strategy described in the introduction and outputs
a message if the position is set to a tab position to the left of the current
position in the line. If this occurs when text is output at the terminal then the
message EDT2902 is output. If it occurs during the evaluation of tab
characters in a work file using the @TABS statement (format 3) then the
message EDT4312 is output. Furthermore, in this case, no further tabulator
expansion is performed as of the line to which the message refers.

If CHECK but not char is specified then the strategy is set irrespective of
whether a software tabulator is defined and active. It applies until it is
explicitly modified again.

FORWARD

EDT uses the forward strategy described in the introduction.

If FORWARD but not char is specified then the strategy is set irrespective of
whether a software tabulator is defined and active. It applies until it is
explicitly modified again.

NOCHECK

EDT uses the positioning strategy described in the introduction and does not
check whether any tabulator expansion is performed at a position to the left
of the current line position.

If NOCHECK but not char is specified then the strategy is set irrespective of
whether a software tabulator is defined and active.

It applies until it is explicitly modified again.

When EDT starts, the value NOCHECK is set by default.

col1

Specifies the number of characters per line (1..32768) for the check of the
line length in L mode. EDT checks the number of characters in newly
entered lines. In particular, it is used to display any cases in which the
predefined line length is exceeded due to possible tabular expansions.

If a line is longer than the value specified in col1 then the line is
nevertheless created and EDT outputs the message EDT2901 to indicate that the
predefined number of characters per line has been exceeded.

If col1 is not specified then the set value remains unchanged.

When EDT starts, the value for the line length check in L mode is set to
32768 characters.

ON

The function of the software tabulator is activated. A software tabulator must
already have been defined.

If no tab positions are defined then the @TABS statement is rejected with
the error message EDT4941.

OFF

The function of the software tabulator is deactivated. The defined tab
positions are retained and can be reactivated using the @TABS ::ON
statement.

VALUES

The current tab character and the associated software tabulator tab
positions are output. If no tab character is defined then there is no output.

The tab positions for output are five digits in length. Up to 11 tab positions
can be output per output line. These are then followed by a line break. The
tab character is not output in the continuation lines.

In interactive mode, the output is written to SYSOUT and in batch mode it is
written to SYSLST.

If, due to tabulator expansion, a line exceeds the maximum length of 32768 characters then it is truncated to the maximum length and the message EDT1903 is output in L mode and the message EDT2400 in F mode.

If tab positions are defined and the @SCALE ON statement has been used in F mode to activate the column counter display then an additional screen line is displayed in which the current tab positions are indicated by an 'I'. In this line, the tabulator character itself is depicted in the statement code column.

The tab character applies globally to all the work files. If data is entered in F mode then tabulator expansion is performed in the entire line, not just in the displayed section.

If only a strategy is specified (e.g. @TABS::FORWARD), then this strategy is set even if no software tabulator has been defined. If no strategy is specified then the set strategy is retained. When EDT starts, the value NOCHECK is set by default.

Note

If @TABS:: is entered then the current software tabulator setting is set to undefined. If no software tabulator at all is specified (but, for example, a hardware tabulator is) then this statement has no effect.

It is better to use @CHECK to modify the value for the line length check in L mode. Here it is now only supported for reasons of compatibility.

The main use of the @TABS statement is to create files, e.g. source files, which have the correct information in the correct columns. For example, it makes sense to issue the statement @TABS::[:10,16,40 CHECK 71 when creating a source file for an Assembler program. CHECK ensures that a message is output if excessively long names are specified (FORWARD instead of CHECK would not achieve the desired effect here). It is sensible to specify a maximum line length of 71 since this means that column 72, which indicates continuation lines, cannot be overwritten.

Caution

It is risky to have too many tab characters in a line when using the positioning strategy.
If a further tabulator expansion is performed, e.g. due to a correction in the line in F mode then these all suddenly become effective – usually with unwanted consequences.

Example

[ is declared as the tab character. Let the tab positions be 10, 16 and 40.

The text is entered together with 3 tab characters.

Tabulator expansions are performed in columns 10, 16 and 40.