Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Additional functions - explanations

&pagelevel(4)&pagelevel

Local character sets

In EDT V17.0A Unicode mode, it is possible to define a different character set for each work file. This includes the 7-bit and 8-bit character sets which were supported in the past as well as the Unicode character sets UTF8, UTF16 and UTFE, the ISO character sets supported by XHCS and the user-defined character sets declared in XHCS.

In statements both in literals and in data, it is possible to specify Unicode characters by means of a substitute representation by defining the hexadecimal value of the corresponding UTF16 code.

The character sets for the individual work files are set either implicitly by reading a correspondingly coded file or explicitly via the @CODENAME statement.

A detailed description of working with local character sets, and in particular of data transfer between work files or between EDT variables and work files can be found in the section “Character sets”.

Long records

The restriction of the record length to 256 characters is eliminated in EDT V17.0A Unicode mode. When reading from and writing to DMS files, EDT is able to process records of a maximum length of 32768 bytes (depending on file format). This limit is imposed by the DMS and refers to the byte count. In the case of library elements, the limit imposed by LMS is 32763 bytes. Because when Unicode character sets are used, characters may be coded by multiple bytes, the permitted number of characters per record may be lower. Internally, EDT works with long buffers with the result that this restriction only has an impact when the records are converted into the work file character set for write operations. EDT provides a statement (@CHECK, Format 2) which can be used to check whether records need to be truncated on write operations.

In the case of POSIX files, the line length is restricted only by the maximum EDT line length of 32768 characters (not bytes).

The elimination of the record length restriction applies equally to records in work files, string variables and statement lengths and has an effect on the statement syntax (e.g. in the case of column specifications), the layout of the status display, the subdivision of the screen on @EDIT LONG and on the subroutine interface.

Consistent handling of empty 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 logical line end character [LZE]. 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 displayed. The screen line then ends with the last character of the record that is still visible or consists only of protected NUL 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 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 lines do not (yet) correspond to any record in the work file and consist only of NULL characters (X'00') without [LZE] (and which 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. When input is performed in F mode, EDT ignores all NULL characters at the end of the entered 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 from the right. The [LZE] itself is ignored on input. 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 blanks to be inserted by default in the work file after data transfer (or alternatively a record with n-1 NULL characters depending on the definition made using @SYMBOLS FILLER). 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 line. When adding entries to a line, it is therefore necessary to activate the terminal insertion mode or to overwrite the [LZE] character. This incompatibility with EDT V16.6B is tolerated since it permits the consistent handling of blank lines in Unicode mode.

For a more precise description of program behavior on the entry of lines which contain NULL characters or fill characters, see section “F mode”.

Availability of all work files

In F mode, it is now possible to switch to one of the work files 10 to 22 by entering the corresponding number in the statement line. In the past, this was only possible in L mode with the help of the @PROC statement (see also section “F mode”).

Uniformity of the statement interfaces

In EDT V17.0A, it is now possible to access files of all supported file types using a uniform set of statements (@OPEN, @CLOSE, @COPY, @WRITE) (see also “File processing” and the descriptions of the individual statements).

To make this possible, the statements have been extended by the corresponding operands. Although it is still possible to use the old statements, users are recommended to employ only the new statements.

For reasons of completeness and consistency, new operands have also been introduced for other statements. For the related details, see the statement descriptions.