1 | Field ID | Input | Binary(4) |
2 | Cursor row | Input | Binary(4) |
3 | Cursor column | Input | Binary(4) |
4 | Command buffer handle | Input | Binary(4) |
5 | Low-level environment handle | Input | Binary(4) |
6 | Error code | I/O | Char(*) |
Return code | Output | Binary(4) |
The Insert Cursor (QsnInsCsr) API sets the insert-cursor address. The insert-cursor address specifies the home-cursor address. (The position of the cursor when the host system unlocks the keyboard and the display station operator presses the Home key.) The display address is not affected by this command if this is an indirect operation and the target command buffer contains an active Write to Display (WTD) command. Otherwise, a WTD command is inserted that resets the display address to row 1 column 1.
If bit 1 of the associated Write to Display command is set to 0 (which is the default), the cursor will be moved on the screen when the QsnInsCsr API is called. To prevent the cursor from being moved, the control character byte 2 bit should be set to 1 and the Write to Display (QsnWTD) operation should be explicitly issued to a command buffer used by the QsnInsCsr API.
This command corresponds indirectly to the 5250 Write to Display (WTD) command with an Insert Cursor order. (For an indirect operation, a WTD is placed in the command buffer only if one does not already exist in that buffer.)
None
The same restrictions apply as for the Write Data (QsnWrtDta) API.
The field ID indicating the field at which to set the display address. If this parameter is specified with a nonzero value, the row and column parameters are ignored and the row and column values corresponding to the field ID are used to set the display address. Either the field ID or the row and column parameters must be specified.
The row at which to position the insert cursor. The row parameter must refer to a row no greater than the current screen or window mode height (if window mode is enabled). The actual screen row used for a screen I/O operation is calculated using the formula base+offset=actual. The base is the row location of the top window border (0 for full screen) if offset is positive, or the row location of the bottom window border (screen height plus 1 for full screen) if offset is negative. The offset is the row parameter value specified, and actual is the actual screen row to be used. A CPFA307 error occurs if an incorrect row value is specified.
The column at which to position the insert cursor. The column parameter must refer to a column no greater than the current screen or window mode width (if window mode is on). The actual screen column used for a screen I/O operation is calculated using the formula base+offset=actual. The base is the column location of the left window border (0 for full screen) if offset is positive, or the column location of the center window border (screen width plus 1 for full screen) if offset is negative. The offset is the column parameter value specified, and actual is the actual screen column to be used. A CPFA307 error occurs if an incorrect column value is specified.
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 insert cursor is positioned at the specified location immediately. Otherwise, this is an indirect operation and the command is stored in the command buffer without an I/O operation taking place.
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.
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.
A return code indicating the result of the operation. The value returned will be 0 if the operation was successful, or -1 otherwise.
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. |
CPFA304 E | Data-stream error &1 reported for screen I/O operation. |
CPFA305 E | Cannot add operation to command buffer. |
CPFA307 E | Screen position &1, &2 outside of display or window area. |
CPFA31E E | Required parameter &1 omitted. |
CPFA331 E | Buffer handle incorrect. |
CPFA334 E | Low level environment handle incorrect. |
CPFA33C E | Undefined field ID &1. |
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. |
Top | Dynamic Screen Manager APIs | APIs by category |