The Extract_Cursor_Offset (CMECO) call provides the program with the last value for the cursor position, as sent by openUTM to the client, as long as the cursor is set in the UTM program unit using KDCSCUR.
The Extract_Cursor_Offset call is only allowed in the states “Send” and “Receive” and in the “Reset” state after a Receive-/Receive_Mapped_Data call.
This function is not a component of the CPI-C specification, it is an additional function of the UPIC carrier system.
CMECO(conversation_ID, cursor_offset, return_code)
Parameters
--> conversation_ID | Conversation identifier |
<-- cursor_offset | Offset of the cursor position. |
<-- return_code | Result of the function call. |
Result (return_code)
CM_OK
The call was OK.
CM_PROGRAM_PARAMETER_CHECK
The value in conversation_ID is invalid. The value of conversation_ID is invalid because the function was called more than once after terminating the conversation or because no conversation yet exists (after the Enable_UTM_UPIC call no IInitialize_Conversation has been issued).
CM_PRODUCT_SPECIFIC_ERROR
The UPIC instance could not be found.
CM_PROGRAM_STATE_CHECK
The conversation is not in one of the following states: “Reset”, “Receive” or “Send”.
State change
The call does not change the state of the conversation.
Notes
If the return code is not CM_OK, the value of cursor_offset has no significance.
The value for conversation_ID remains valid for this function call, even after terminating a conversation and continues to be valid until Initialize_Conversation or Extract_Cursor_Offset are called.
A KDCSCUR call overwrites a previous KDCSCUR call in the UTM program unit.
If an invalid address is entered in KDCSCUR in the UTM program unit Extract_Cursor_Offset returns the value 0.
For a +format the address of the attribute field is given as the cursor position.
Behavior in the event of errors
CM_PROGRAM_STATE_CHECK
Modify program
CM_PROGRAM_PARAMETER_CHECK
Modify program
CM_PRODUCT_SPECIFIC_ERROR
The operating system cannot provide sufficient memory for the internal buffers. Check whether the memory requirement of your program is too high and if necessary reboot your system.
CM_ENTRY Extrac_Cursor_Offset ( unsigned char CM_PTR conversation_ID, CM_INT32 CM_PTR cursor_offset, CM_RETURN_CODE CM_PTR return_code )