Put Output Command (QsnPutOutCmd) API


  Required Parameter Group:

1 Command Input Char(1)

  Omissible Parameter Group:

2 Command data Input Char(*)
3 Command Data Length Input Binary(4)
4 Command buffer handle Input Binary(4)
5 Low-level environment handle Input Binary(4)
6 Error code I/O Char(*)

  Returned Value:

Return code Output Binary(4)

  Default Public Authority: *USE

  Service Program: QSNAPI

  Threadsafe: No

The Put Output Command (QsnPutOutCmd) API is used to issue data stream commands that are not directly supported through a DSM API. An escape (X'04') character is inserted in the stream directly before the command itself for both direct and indirect operations.

Note: The Write Data (QsnWrtDta) API should be used for issuing Write to Display command orders such as the Write Extended Attributes order.

This operation corresponds to an escape character followed by the specified command.


Authorities and Locks

None


Required Parameter

Command
INPUT; CHAR(1)

The 1-byte character code for the output command to be issued. For example, to issue a Restore Partial Screen, the command data should contain X'13', the command data will contain the restore data length followed by the restore data, and the command data length will be 2 plus the restore data length.


Omissible Parameter Group

Command data
INPUT; CHAR(*)

The data for the command to be issued.

Command data length
INPUT; BINARY(4)

The length of the command data parameter. If 0 is specified, the command data parameter is ignored. Otherwise, the command data parameter is required.

Command buffer handle
INPUT; BINARY(4)

A handle for the command buffer in which to store the command. If this parameter is omitted or specified as 0, this is a direct operation and the command is sent to the display. If the command being sent is an input command, you must specify a command buffer and then use the Put Command Buffer and Perform Get (QsnPutGetBuf) API to issue the command and retrieve the resulting input. 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.
CPFA305 E Cannot add operation to command buffer.
CPFA31E E Required parameter &1 omitted.
CPFA331 E Buffer handle incorrect.
CPFA333 E Parameter &1 not positive integer value.
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