Clear Screen (QsnClrScr) API


  Omissible Parameter Group:

1 Mode Input Char(1)
2 Command buffer handle Input Binary(4)
3 Low-level environment handle Input Binary(4)
4 Error code I/O Char(*)

  Returned Value:

Return code Output Binary(4)

  Default Public Authority: *USE

  Service Program: QSNAPI

  Threadsafe: No

The Clear Screen (QsnClrScr) API clears the screen and sets the screen size to the specified mode. This command corresponds directly to the 5250 Clear Unit or Clear Unit Alternate command, depending upon the current screen presentation size. See the 5250 data stream documentation for details.


Authorities and Locks

None


Restrictions

If this is an indirect operation, it must be the first command in the command buffer.


Omissible Parameter Group

Mode
INPUT; CHAR(1)

The mode to place the screen in after the screen is cleared. If this parameter is omitted, a value of 0 is assumed.

The possible values are:

0 Indicates that the current screen size should be kept. For indirect operations where this value is specified, the subsequent clear operation will be based on the current screen size, not on whatever size the screen is when the command buffer is ultimately written out. The current display size will be determined using the QsnRtvMod interface.
3 Set screen to 24x80 mode.
4 Set screen to 27x132 mode. This value is not supported by all devices. A CPFA306 error will occur if an attempt is made to specify this value with a device that does not support it.

Command buffer handle
INPUT; BINARY(4)

If this parameter is omitted or specified as 0, this is a direct operation and the screen is cleared immediately. Otherwise, this is an indirect operation and the command is stored in the command buffer without an I/O operation taking place.

Low-level environment handle
INPUT; BINARY(4)

The low-level environment that the operation applies to. If this parameter is omitted or given with a value of zero, the default low-level environment is used.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter. If this parameter is omitted, diagnostic and escape messages are issued to the application.


Returned Value

Return code
OUTPUT; BINARY(4)

A return code indicating the result of the operation. The value returned will be 0 if the operation was successful, or -1 otherwise.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPFA301 E Command buffer is full.
CPFA303 E Error occurred for screen I/O operation.
CPFA304 E Data-stream error &1 reported for screen I/O operation.
CPFA306 E Command not supported by current device.
CPFA321 E Operation not first command in command buffer.
CPFA322 E Incorrect display mode &1 specified.
CPFA331 E Buffer handle incorrect.
CPFA334 E Low level environment handle incorrect.
CPFA343 E Output operation not done.
CPFA344 E The file &2 in library &3 is not valid.
CPFA345 E The invite active flag is not valid.


API introduced: V2R3
Top | Dynamic Screen Manager APIs | APIs by category