Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Extract_Transaction_State - Querying service and transaction state of the server

&pagelevel(4)&pagelevel

The Extract_Transaction_State call provides the program with the service and transaction state sent to the client by openUTM.

The Extract_Transaction_State call is permitted only in the "Send" and "Receive" state and in the "Reset" state directly after a Receive/Receive_Mapped_Data call.

This function is not a component of the CPI-C specification but is an additional function of the UPIC carrier system.

Syntax
CMETS (conversation_ID, transaction_state, requested_length, transaction_state_length, return_code)

Parameters

--> conversation_ID

Conversation identifier

<-- transaction_state

Transaction and service state

--> requested_length

Maximum length of the data that can be received

<-- transaction_state_length

Length of the message received

<-- return_code

Result of the function call.

Result ( return_code )

CM_OK

The call is OK

CM_PROGRAM_PARAMETER_CHECK

The value in conversation_ID is invalid.
The value in conversation_ID is invalid because the function was called more than once after the end of the conversation or because no conversation existed (the Enable_UTM_UPIC call has not yet been followed by an Initialize_Conversation call).

CM_PRODUCT_SPECIFIC_ERROR

The UPIC instance could not be found.

CM_PROGRAM_STATE_CHECK

The conversation is not in the "Reset", "Send" or "Receive" state.

State change

The call does not change the state of the conversation.

Notes

  • If the return code is not CM_OK, the value of transaction_state has no significance.

  • The value of conversation_ID remains valid for this function call after the end of a conversation until an Initialize_Conversation or an Extract_Transaction_State call has been made.

  • If the value of transaction_state_length is 0, no new transaction_state was received.

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 internal buffers. Check whether the memory requirement of your program is too high and if necessary reboot your system.

Description of transaction_state

The first two bytes of transaction_state contain the information on the service and transaction state of the server and can be evaluated accordingly. The remaining bytes (dd dd) contain internal diagnostics information.

transaction_state
(hexadecimal)

Meaning

17 08 dd dd
18 08 dd dd

End of the processing step; the transaction is not completed, the service is still open (PEND/PGWT KP).

15 06 dd dd
16 06 dd dd

End of the processing step; the transaction is completed, the service is still open (PGWT CM/PEND RE).

1A 04 dd dd

End of a service and end of the transaction (PEND FI).

30 04 dd dd

End of a service with memory dump (PEND ER).

31 04 dd dd

End of a service (system PEND ER, i.e. PEND ER by openUTM).

32 04 dd dd

End of a service due to abnormal task termination (only openUTM on BS2000 systems).

20 04 dd dd
21 04 dd dd

Roll back of the first transaction of a service and end of the service
(PEND RS).

20 06 dd dd
21 06 dd dd

Roll back of a follow-up transaction to the last synchronization point; the service is still open (PEND RS).

For further information on PEND and PGWT calls refer to the openUTM manual „Programming Applications with KDCS”.

Function declaration: Extract_Transaction_State
CM_ENTRY Extract_Transaction_State( 
                         unsigned char      CM_PTR  conversation_ID, 
                         unsigned char      CM_PTR  transaction_state,
                         CM_INT32           CM_PTR  requested_length,
                         CM_INT32           CM_PTR  transaction_state_length, 
                         CM_RETURN_CODE     CM_PTR  return_code )