SCREEN PUT_CHARS writes characters to a window and overwrites any existing text. By default, this statement/command modifies only the characters where the new characters are written. However by specifying the erase flag, the line can be erased before the new characters are written. The cursor is positioned following the last written character. Only a single line is written; excess characters at the end of the line are discarded.
SCREEN PUT_CHARS /USING/ window_id string start_row start_column erase_flag rendition
window_id |
is an integer system field, Global Storage (GS) field, or user-defined field that contains the window ID assigned to the window. |
string |
is a string expression that specifies the character string to be written. |
start_row |
is an integer expression that specifies the line at which output begins. If zero, output begins on the current line. |
start_column |
is an integer value that specifies the column at which output begins. If zero, output begins on the current column. |
erase_flag |
specifies whether to erase the line before writing the characters to the window. The valid values are:
|
rendition |
specifies the video attributes of the written characters. More than one attribute may be defined by separating the attributes with plus signs. |
|
The valid video attributes are:
|
SCREEN PUT_CHARS USING MAIN_ID & 'Not a valid option' 10 20 @ERASE BOLD
This example overwrites the current text in row 10, column 20, and puts the "Not a valid option" message in its place. The old text is overwritten only for the length of the specified character string.