Ebcdic1() action

From The x3270 Wiki

New in 4.0

The Ebcdic1() action returns part or all of the contents of the screen buffer as EBCDIC values. It uses 1-origin coordinates; the upper-left corner of the screen is row 1, column 1.

Each screen buffer position is returned as a 2-digit hexadecimal number, e.g., 81 for the letter a. Start Field characters are returned as 00. Each row on the screen becomes a separate line of output, with each buffer position separated by spaces.

Parameters

Ebcdic1() takes 0, 1, 3 or 4 parameters.

If no parameters are given

The entire screen buffer is returned.

If one parameter is given

The screen text is returned starting with the cursor position.

length
Number of buffer positions

If three parameters are given

row
Starting row (1-origin)
column
Starting column (1-origin)
length
Number of buffer positions

If four parameters are given

row
Starting row (1-origin)
column
Starting column (1-origin)
rows
Number of rows
columns
Number of columns

Return value

Screen text, one row per line.

Examples

Return the entire screen buffer, one row per line.

Ebcdic1()

Return 27 buffer positions, starting at the cursor position.

Ebcdic1(27)

Return 80 buffer positions starting at row 3, column 1. (The upper-left corner of the screen is row 1, column 1.)

Ebcdic1(3, 1, 80)

Return 8 rows and 40 columns starting at row 3, column 1. (The upper-left corner of the screen is row 1, column 1.)

Ebcdic1(3, 1, 8, 40)

See also

Ebcdic(), a similar action that uses 0-origin coordinates.