CBL_SWAP_SCR_CHATTRS

The CBL_SWAP_SCR_CHATTRS routine is one of a set of library routines that facilitate reading and writing attributes on the screen. This routine writes a string of characters and their attributes over another character string on the screen.

Usage

CALL "CBL_SWAP_SCR_CHATTRS" 
    USING SCREEN-POSITION, CHARACTER-BUFFER, ATTRIBUTE-BUFFER,
        STRING-LENGTH 
    RETURNING STATUS-CODE

Parameters

SCREEN-POSITION Group item Group item is defined as follows:
01  SCREEN-POSITION.
    03  ROW-NUMBER      PIC X COMP-X.
    03  COLUMN-NUMBER   PIC X COMP-X.

On entry, contains the screen position to start writing (the top left corner is row 0, column 0)

CHARACTER-BUFFER PIC X(N). On entry, contains the characters to write

On exit, this data item contains the characters overwritten on the screen. It must be at least the length specified by STRING-LENGTH. Positions in the data item beyond that length are unchanged.

ATTRIBUTE-BUFFER PIC X(N). On entry, contains the attributes to write

On exit, this data item contains the attributes overwritten on the screen. It must be at least the length specified by STRING-LENGTH. Positions in the data item beyond that length are unchanged.

STRING-LENGTH PIC XX COMP-X.    On entry, this item contains the length of the string to write. Note that the write stops at the end of the screen.

On exit, this item contains the length of the overwritten string (in cells, that is character-attribute pairs).

STATUS-CODE Any numeric type Returns 1 if successful, or 0 if not successful

Description

This library routine uses SCREEN-POSITION (in row and column coordinates) to determine where to begin the write operation. On entry, CHARACTER-BUFFER and ATTRIBUTE-BUFFER contain the characters to write and their corresponding attributes, respectively, and STRING-LENGTH contains that string's length. On exit, CHARACTER-BUFFER and ATTRIBUTE-BUFFER contain the characters that were replaced on the screen and their corresponding attributes, respectively. STRING-LENGTH is the length of the string that was overwritten.

Note: This routine is not supported with Thin Client.