ReadBuffer() action

Overview
The ReadBuffer action returns the contents of the screen buffer.

Parameters
ReadBuffer takes one or two optional parameters.
 * Ascii
 * Return the buffer contents as ASCII text (using the workstation's local encoding format). This is the default.
 * Note that when ReadBuffer(Ascii) is invoked from the HTTP server, the results are always returned in UTF-8, regardless of the workstations's local encoding.


 * Ebcdic
 * Return the buffer contents in EBCDIC.


 * Unicode
 * Return the buffer contents as Unicode code points.


 * Field
 * Return the only the contents of the current field. Another parameter can also be specified to control the output format.

Return value
The screen buffer contents, one row per line, with each buffer position separated by spaces.

Start Field positions in the buffer are identified with the string, followed by a list of field attributes.

If an ordinary buffer position has additional attribute overrides, these are identified with the string, followed by a list of field attributes.

In EBCDIC mode, a buffer position containing a Graphic Escape character is identified with the string, where nn is the character code in hexadecimal.

Ordinary characters are represented in one of three ways:
 * ASCII mode: text, mapped from EBCDIC to the local workstation's local encoding.
 * EBCDIC mode: 2-digit hexadecimal number.
 * Unicode mode: 4-digit Unicode code point.

In ASCII and Unicode modes, DBCS characters (which take up two buffer positions) are handled specially. The first position is returned with the entire character either as text or as a code point, and the second position is returned as.

Examples
Return the entire screen buffer, one row per line. ReadBuffer

Version history
The Unicode and 'Field options were added in x3270 4.0.