Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@SEQUENCE (format 3) - Check line numbers

&pagelevel(3)&pagelevel

The @SEQUENCE statement (format 3) causes EDT to examine the content of a column or contiguous range of columns in each line of a contiguous line range. In the case of Unicode character sets, it interprets the string located there on the basis of its UTF16 coding. Otherwise, it interprets the string as a binary number in accordance with the coding corresponding to the work file's character set. If the column to be examined is located to the right of the end of the line then EDT considers the column content to be a blank.
EDT checks whether the identified binary numbers form an ascending sequence. It outputs all the lines in which it identifies a binary number which is equal to or smaller than that of the preceding line. In interactive mode, the output is written to SYSOUT and in batch mode it is written to SYSLST.

Operation

Operands

F mode, L mode

@SEQUENCE

[ {lines | svars} ] : [col] : CHECK [int]

lines

The specified column range is examined in each line in the specified line
range.

svars

The specified column range is examined in each string variable in the
specified range of string variables.

col

The operand specifies the column containing the first character that is to be
checked. If all or part of the column range that is to be checked is located
after the end of the line then a blank is taken as the value of every column
located after the end of the line.

If the col operand is missing, EDT starts the check in column 73.

int

This operand specifies the number of columns that are to be considered
(1..8). If the int operand is missing, EDT examines 8 columns.

If a range of string variables is specified then either a Unicode character set or a 7 or 8-bit character set must be defined for all the string variables. If this is not the case, the error message EDT5473 is output and the execution of the statement is aborted.
If neither the lines nor the svars operand is specified then EDT checks every line of the current work file.

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

EDT is to check all lines to determine whether the contents of columns 2 to 3 form an ascending sequence.

EDT outputs all the lines that deviate from the ascending sequence.

Now, only the content of the 1st column in the first four lines is to be used for the check.

The sequence is 1 (line 1), 2 (line 2), 2 (line 3) and 1 (line 4). In particular, it should be noted that the sequence is not considered to be ascending if identical values are identified. This occurs here in line 3.