Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Data window

&pagelevel(5)&pagelevel

In the data window, the current work file is displayed on the screen. A work file consists of records. These records are output in the data window's screen lines and a record may be longer than a single screen line. In this case only part of the record is visible in the data window. The data window represents a section of the work file. However, it can be moved to a new position in the work file.

Provided that their length does not exceed the number of characters that can be displayed at the terminal, records that are longer than a data window line can be displayed in full in EDIT-LONG mode (see @PAR EDIT-LONG).

If the file contains fewer records than the data window has lines, the remaining lines are filled with the filler character (by default the NULL character) and are set to overwritable. These lines are already sequentially numbered with the set default standard increment. The same depiction is also used if the data window is positioned so close to the end of the file that there are fewer records to be displayed than there are lines present in the data window.

When EDT is called, the empty work file 0 is displayed on the screen.

By default, the records in the data window cannot be overwritten. Before they can be modified, individual records must be set to overwritable using the statement codes X or E or all the data window lines must be set to overwritable with [F2]. In EDIT-FULL mode, which is set with @PAR EDIT-FULL=ON, all the records in the data window are overwritable at all times. In EDIT-FULL mode, statement codes can be entered in the statement code column at the same time as entries for the same line are made in the data window (see @PAR EDIT-FULL).

The function keys [F1] to [F22] as well as the [DUE] and [DUE2] keys can be used to transfer input to the terminal. The keys [K1] to [K15] do not transfer the input and any entered text is lost. Some function keys also trigger special actions in EDT, for more information see sections “Function keys in F mode” and “Function keys in L mode”.

Empty lines and new lines

The files that are to be processed by EDT may contain records of length 0. In the case of POSIX or SAM files, the records genuinely have length 0. In the case of ISAM files with standard attributes, the records may have the length 8 or 16 (in the case of files coded in UTF16).

To permit the depiction of records of length 0 in the data window, EDT in Unicode mode indicates the end of the record using a terminal-specific character [LZE] (Logical Line End).

The terminal fills the remainder of the screen to the right of [LZE] with protected NULL characters (X'00'). If the end of the record is located outside of the data window then [LZE] is not depicted and the screen line then ends with the last character of the record that is still visible or consists only of NULL characters. A record of zero length is therefore depicted in the data window by a screen line which consists only of the character [LZE] in column 1 and protected NULL characters (empty line). If [LZE] is entered in column 1 of a screen line then a record of length 0 is created for this line in the work file.

Empty lines should be distinguished from new lines which EDT provides in F mode after the last record in the file or during the processing of the statement codes 1..9 or I. These screen lines do not (yet) correspond to any record in the work file and consist only of NULL characters (X'00') without [LZE] (and can be overwritten).

The [LZE] character can usually be omitted during input. It only has to be entered when the record is intended to end with NULL characters. EDT ignores NULL characters at the end of the entered screen line, i.e. all the NULL characters up to the first character which is not NULL (this can be an [LZE] or another character) are truncated from the right. The [LZE] itself is not taken over into the record. Since new lines only consist of NULL characters they are ignored overall on input and are not inserted in the work file. In contrast, entering an [LZE] in column n of a new line would cause a record with n-1 filler characters (default value: blank) to be inserted in the work file after data transfer. In particular, a record of length 0 would be inserted for n=1.

The terminal does not permit any entries to the right of the [LZE] character in a screen line When adding entries to a line, it is therefore necessary to activate the terminal insertion mode or to overwrite the [LZE] character.

Treatment of filler characters in the data window

Since the [LZE] deletes the remainder of the screen line at the terminal, it is not possible to display any characters in the remainder of the line apart from the character specified for the terminal at the hardware level (normally NULL). The EDT statement @SYMBOLS FILLER can therefore no longer be used in Unicode mode to define the filler character displayed between the end of the record and the end of the screen line in F mode. However, for reasons of compatibility, the filler character specified in this way (default value: NULL) is still replaced by a blank on entry within a record. If all the characters entered in a record, i.e. including the NULL characters, are to be taken over unchanged into the work file, the @SYMBOLS FILLER=''BLANK'' statement must be used to change the filler character to blanks.

Treatment of NULL characters in the data window

If a screen line only contains NULL characters, i.e. no [LZE], and if the displayed section comprises the entire record then the screen line is not taken over into the work file or is even deleted from it when it existed before.

When a record is entered (typed into an empty file, appended at the end of a file, inserted in screen lines which are provided for insertion after one of the statement codes 1..9 or I), NULL before or between other characters (including before [LZE]) are converted into blanks unless @SYMBOLS FILLER has been used to specify a character other than NULL as the filler character (see above).

NULL characters at the end of a screen line are ignored. In the case of records which are longer than the section that can be displayed on the screen, NULL characters at the end of the screen line cause the remaining text to be placed at the first location that is not equal to NULL, thus shortening the record. This mechanism is particularly common when performing insertions with the statement code E.

The statement code D should always be used to delete an entire record. The [LZE] and [LZF] keys can be used to delete sections of a record and operate as follows:

  • [LZE]

    deletes all the characters in the record as of the specified position (including the characters to the right outside of the section displayed on screen). If an entry is made in column 1 of the screen line, a record of length 0 is entered in the work file. [LZE] can therefore never be used to delete an entire record.

  • [LZF]

    deletes only the remainder of the screen line; any characters in the record outside of the screen line are pulled in from the right in the next dialog step. If the displayed section comprises the entire record and contains only NULL characters after the delete operation, i.e. it also contains no [LZE], then the entire record is deleted and removed from the work file. In this case, [LZF] has the same effect as the statement code D.

Nondisplayable characters in the text

If a file contains characters which cannot be displayed on screen then these characters are output as the device-specific smudge character which is set as the SUBSTITUTE-CHARACTER in /MODIFY-TERMINAL-OPTIONS.

If such a record is modified, the original character, not the smudge character, is entered in the file. If the position of the smudge character in the record changes due to insertion or deletion ([EFG] / [AFG]) then a question mark '?' is entered at the position of the smudge character and the line is displayed in protected mode with a '?' in the statement code column. The original content of the record remains intact.

Warning

If insertion or deletion results in the position of the smudge character moving to a location at which another smudge character was previously present, EDT cannot tell whether the character in question is the original or the displaced smudge character. In this case, the change is not indicated by a question mark '?' and the content of the record may change in ways which were not intended.

Note

In LOWER OFF mode, lowercase letters in the file are output as smudge characters. This is intended to remind users that they have activated the wrong mode. Texts which contain nondisplayable characters should entered in HEX mode (see @PAR HEX) or via the substitute representation (see below).