GETX Statement

The GETX statement receives input from an attached line in ASCII hexadecimal format

Format

GETX var [,length] [SETTING count-var] FROM line

   [UNTIL term-expr] [RETURNING term-var]

   [WAITING seconds]

   [THEN | ELSE statements]

Description

The GETX statement accepts input from an attached line, translating it into ASCII hexadecimal format. See GET Statement for more information on the syntax and behavior of GETX.

The GETX statement allows segment marks (CHAR(255)) to be taken from the attached line. This character (FF in hexadecimal) is generally interpreted as the end of data. By using GETX instead of GET, the segment mark is converted to FF and may be successfully transmitted from the remote line.

After reading data from an external line in hexadecimal via GETX, the ICONV function may be used with conversion code MX to convert the text back to readable text. See ICONV Function for more information.

Example

To assign the variable RESP to the first 10 characters from attached line 7, and then to convert it back to ASCII format, the code would read:

GETX RESP, 10 FROM 7

RESP = ICONV(RESP, "MX" )

See Also

Statement and Function Reference