Programming Guide



sm_tm_pinquire

Gets the value of a string attribute of the current transaction for immediate use

#include <tmusubs.h>
char *sm_tm_pinquire(int attribute);

attribute
Specifies the string attribute of the current transaction to copy with one of the constants defined in tmusubs.h and shown in the Description section.

Returns

Description

sm_tm_pinquire gets the current value of a string attribute of the current transaction. This includes not only data in the structure itself, but also data that can be found indirectly, such as data relating to the current table view.

An empty string is returned if any of the following errors occurs: the current transaction is null, attribute is invalid, the value of attribute is a non-existent string, or the length of the value of attribute is greater than 255.

Because the objects pointed to by the pointers returned by sm_tm_pinquire usually have short duration, as they are stored in rotating buffers, use or copy them quickly

Supply one of the following constants to specify the desired transaction attribute:

TM_BUFFER
General purpose string.

TM_COMMAND_PARM
Text string passed to sm_tm_command.

TM_COMMAND_ROOT
Text of sm_tm_command exit message.

TM_MSG_TEXT
Identifies the root table view of the current command. This is either the root of the tree (for the entire transaction), or the root of the partial tree specified for the current command.

TM_PARENT_NAME
Name of parent table view of current table view.

TM_PREVIOUS_HOOK
Name of the previous event function. Used when writing an error handler.

TM_ROOT_NAME
Name of root table view of the transaction.

TM_SAVE_CURSOR
SAVE or VALIDATION cursor name.

TM_SV_NAME
Name of server view containing current table view.

TM_SV_SELECT_CURSOR
SELECT cursor name.

TM_TRAN_NAME
Name of the current transaction.

TM_TRANS_MODEL_NAME
Name of the transaction model.

TM_TV_NAME
Name of the current table view.

TM_USER_BUFFER
Buffer reserved for user use.

See Also

sm_tm_inquire, sm_tm_iset, sm_tm_pset, sm_tm_pcopy