Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Entering records in character, hexadecimal or binary format

&pagelevel(4)&pagelevel

In L mode, records (but not statements) can be entered not only as character strings but also as sequences of hexadecimal or binary characters. The @INPUT statement (format 3) is used to switch between these input formats.

By default, EDT expects L mode input in the form of character strings (@INPUT CHAR). In this format, the character set of the underlying data source is used (terminal, SYSDTA, file, library element, work file). Since the entered records are inserted in the current work file and the character set used in this work file may be different from that of the data source, a conversion operation may be necessary. The precise rules are described in section “Character sets”.

If records are to be entered as sequences of hexadecimal or binary characters in L mode, then this must be set explicitly using the statement @INPUT HEX or @INPUT BINARY. The hexadecimal or binary characters themselves are expected in the character set used in the associated input source. The specified codes are then interpreted in the character set used in the current work file. If hexadecimal characters are entered which do not correspond
to any valid character in this character set then the input is rejected with the message EDT5460 (see also section “Character sets”).

Once hexadecimal or binary input has been activated, only records in a valid hexadecimal or binary format are accepted. Invalid input is rejected with the message EDT3902 or EDT3901. If the number of entered characters is not a multiple of 2 or 8 then the input is leftfilled with blanks.

Since, when a hexadecimal representation is used, each character is coded by at least two bytes, the number of characters that can be entered per line is reduced to no more than half of the value that would otherwise apply to the input source in question. In the case of binary representation, the number of characters is reduced to an eighth or less of the value applicable for the input source.

Example

1.     ABC
2.     @INPUT HEX
2.     C1C2C3
3.     @INPUT BINARY
3.     110000011100001011000011
4.     @PRINT 
1.0000 ABC
2.0000 ABC
3.0000 ABC
4.