Chapter 1. Overview

Table of Contents

1.1. Commands
1.2. Functions
1.2.1. Functions Available both in a Server and a Client
1.2.2. Server Functions
1.2.3. Client Functions
1.2.4. TCP/IP Gateway Functions
1.2.5. TDL Functions
1.2.6. Windows Functions
1.2.7. Other Functions

This chapter presents a list and brief description of the commands and functions used in the Tmax system.

1.1. Commands

The following are commands available in Tmax.

CommandDescription
cflCompiles a Tmax text configuration file into a binary file.
etmm / eclhImproves performance when an event-driven communication method uses more fds than an existing communication method.
fdlcCompiles a field key table.
gstCreates a service table by referring to a binary Tmax configuration file.
mkaclCreates an access control list (ACL).
mkcliCreates a Tmax client module.
mkgrpCreates a user group.
mkpwManages a password file.
mksvrCreates a Tmax server module.
racdCentralizes the management of nodes in a distributed multi-node environment.
racdrUses the racd process running in another domain to transfer a file to a directory or to execute the tmboot, tmdown, cfl, or gst.
sdlcCompiles a file that defines structures.
svcrptAnalyzes and prints log records related to a service execution while a Tmax system operates.
tdlcleanRemoves outdated library files and unnecessary files under a run directory.
tdlinitInitializes TDL shared memory and dynamic modules.
tdlnmRetrieves a list of functions to be automatically exported to a specified library.
tdlrmRemoves shared memory when a TDL is no longer used.
tdlshmRetrieves information about TDL shared memory or enables/disables statistics monitoring and modules.
tdlsyncSynchronizes a backup file with TDL shared memory.
tdlupdateUpdates a specified dynamic module.
tencryptEncrypts an OPENINFO clause in a configuration file.
tmadminManages a Tmax system.
tmapmRedefines a signal alarm for a service or provides a service timeout for a service that cannot use a signal alarm.
tmaxlibverRetrieves a Tmax library version.
tmaxtraceEnables runtime tracing for each application.
tmbootStarts an entire Tmax system or a portion of it.
tmdSimulates a client for testing a server program.
tmdownTerminates an entire Tmax system or a portion of it.
tmmbfgenConverts a text service information file into a binary file.
tmsnmpdRetrieves a Tmax configuration and performance information via the standard SNMP protocol.
tperrRetrieves detailed error information using an error number and type.
uncflConverts a binary Tmax configuration file into a text Tmax configuration file.
untmmbfgenConverts a binary service information file into a text file.
xwsdlgenCreates a WSDL file, which defines web services.

1.2. Functions

The following are functions available in Tmax.

1.2.1. Functions Available both in a Server and a Client

FunctionDescription
gettperrnoReturns errno, which is an error code set in a server and client, when calling a Tmax System.
tmax_chk_connChecks the connection status of a client by checking the execution status of a tpstart() function, socket status, and message transmission.
tmax_gq_countReturns the amount of data stored in a GQ.
tmax_gq_getRetrieves data from a GQ with a specified key.
tmax_gq_getkeylistRetrieves a GQ key list.
tmax_gq_keygenGenerates a system key and retrieves it.
tmax_gq_purgeRemoves data specified with a key from a GQ.
tmax_gq_putEnters data into a GQ.
tmax_get_sessionidReturns a current session ID.
tmax_keylist_countRetrieves a key count from a keylist handle.
tmax_keylist_freeReleases memory and other resources in a keylist handle.
tmax_keylist_getakeyRetrieves information on a key located at the nth index in a keylist.
tmax_sq_countReturns the amount of data stored in a SQ of a current session.
tmax_sq_getRetrieves data from a SQ.
tmax_sq_getkeylistRetrieves a key list from a current SQ.
tmax_sq_keygenCreates a system key and retrieves it.
tmax_sq_purgeRemoves data specified with a key from a SQ
tmax_sq_putEnters data into a SQ
tmaxlastsvcEnables a user to find a service name before service results are returned to a user. The user can use this information to find the name of a service in which an error occurred, or they can find the most recently executed routine.
tmaxreadenvReads information about an accessed system from a file and redefines environment variables.
tp_sleepWaits for arrival of data in seconds.
tp_usleepWaits for arrival of data in microseconds.
tpabortRolls back a global transaction.
tpacallSends an asynchronous service request.
tpacallsvgAsynchronously sends a service request to a service included in a specific server group in a server group environment grouped by a COUSIN.
tpalivechkDisplays the connection status of a client by checking a socket status
tpallocAllocates a typed buffer.
tpbeginSets a transaction time and starts a global transaction.
tpbroadcastBroadcasts unsolicited messages to clients registered to a Tmax system.
tpcallSends a service request through synchronous communication and receives a response to the request.
tpcallsvgCalls service from a server group through synchronous communication in a multi server group environment grouped by COUSIN.
tpcancelCancels a call descriptor.
tpcommitCommits a global transaction.
tpconnectAllows a program to establish communication with a conversational service 'svc'.
tpdeqLoads data from a RQ.
tpdeq_ctlSupports transactions and loads data from a RQ.
tpdisconCloses a connection in a conversational communication.
tpenqStores data in a RQ.
tpenq_ctlSupports transactions and stores data in a RQ.
tperrordetailExtracts the depth of an error.
tpextsvcinfoProvides detailed information about data derived from a RQ through a tpdep() function in a server and a client.
tpextsvcnameExtracts a service name from data read from a RQ.
tpfreeFrees memory allocated in a typed buffer.
tpget_timeoutReturns a configured blocking timeout.
tpgetactivesvrRetrieves a list of active servers.
tpgetcliaddrRetrieves the ip and port number of a client connecting to a Tmax system.
tpgetcliaddr_ipv6Retrieves the ip and port number of a client connecting to a Tmax system with the IPv6 protocol environment.
tpgetclidRetrieves the ID of a client connected to a Tmax system.
tpgetctxtReturns a current context.
tpgetenvReturns the value of an environment parameter registered under a 'name'.
tpgetlevChecks whether a transaction mode is active.
tpgetpeernameReturns the socket address of a peer node after a connection is established in a Tmax system.
tpgetrplyReceives a reply to an asynchronous service request sent through a tpacall() function.
tpgetsocknameReturns the name of a current socket used internally by a Tmax system.
tpgetsprlistRetrieves the index of a server process to which a relevant service belongs. It is used to call a service as a server process unit.
tpgetsvglistReturns information about a server group to which a service belongs or that of its cousin server group.
tpgprioRetrieves the priority of a service request.
tpmcallCalls the services of all server groups that belong to a COUSIN.
tpmcallxAPI developed to support the extended features of a tpmcall(). Unlike existing functions, it waits until it receives replies from all services of a COUSIN server group.
tpnotifySends unsolicited message to a specified client from a server.
tppostPosts a specific event.
tpputenvReconfigures an environment variable.
tpqstatRequests statistical data stored in a RQ.
tpqsvcstatReturns the statistical data of a specific service stored in a current queue.
tpreallocReallocates a pointed buffer and returns a pointer to a new buffer.
tprecvReceives data transmitted from a program connected through conversational communication.
tpreissueReissues a request currently in the fail queue of a RQ.
tpscmtChanges a commit configuration in a configuration file.
tpsendSends data to a peer program in an interactive communication.
tpsetsvctimeoutSets the service timeout in a server.
tpset_timeoutSets a block timeout.
tpsetfdRegisters a socket fd in a UCS process scheduler.
tpsleepSleeps for a maximum time for a timeout and returns immediately when data arrives within that time.
tpspracallCalls a service for a specific server process with a certain index from the indexes obtained by a tpgetsprlist().
tpsprioSets the priority of the next request to be sent by a tpacall().
tpsetctxtSets a current context.
tpstrerrorOutputs messages related to an error code.
tpsubqnameReturns the name of a queue that corresponds to a sub queue number.
tpsubscribeSubscribes to an event or set of events named by an eventname.
tptypesProvides information about the type and subtype of a buffer.
tpunsubscribeRemoves an event subscription or a set of event subscriptions from the list of subscriptions of a Tmax system.
tuxgetenvReturns the value of an environment parameter registered under a 'name' parameter.
tuxputenvApplies 'name= value', entered as a string, to an environment variable.
tuxreadenvLoads environment variables from a file.
tx_beginStarts a global transaction.
tx_commitCommits a transaction job.
tx_infoReturns global transaction information.
tx_rollbackRolls back a transaction.
tx_set_commit_returnSets a commit_return property.
tx_set_transaction_controlSets a transaction_control property as a control value.
tx_set_transaction_timeoutSets a transaction_timeout property as a timeout value.
ulogsyncStores ‘ulog’ contents in the memory buffer to a <ulog.dat> file.
userlogWrites information required for programs to a <ulog.date> file.
UserLogWrites on a 'ulog' file immediately without using a memory buffer.
tpremoteconnectConnects to a remote system with TCP.
tpgetrcahseqnoReturns a RCAH process number like tpgetsvrseqno API.
tpgetrcainfoReturns RCAH thread information.

1.2.2. Server Functions

FunctionDescription
_tmax_check_licenseValidates Anylink and OpenFrame licenses.
_tmax_event_handlerA callback function triggered by a SLOG in situations where a SVRTYPE is set to EVT_SVR.
_tmax_mainUsed for a user program that contains a main.
tmadminEnables dynamic usage of statistical information, which can be retrieved through tmadmin, a system admin tool.
tmax_get_db_passwdIdentifies the password of a username in a database to which Tmax is currently connected.
tmax_get_db_tnsnameIdentifies the tnsname in a database to which Tmax is currently connected.
tmax_get_db_usrnameIdentifies the username in a database to which Tmax is currently connected.
tmax_get_svccntReturns the number of services available on a server.
tmax_get_svclistRetrieves a list of services available on a server.
tmax_is_restartedDisplays a server restart status after a server process failure. This function can be called from a Tmax AP Server routine.
tmax_is_xaDisplays whether a server to which a process belongs to is XA compliant or not.
tmax_my_svrinfoDisplays the system configuration of a server process.
tmgetsmgidSupports the SysMaster trace function and returns a group ID of a calling process.
tmget_smtrclogStores logging data in a structure buffer.
tmget_smtrclog_countReturns the amount of data to be logged.
tpadvertiseAllows a server to advertise the service that it offers.
tpcancelctxRemoves the contents of a CTX_T structure in a server library.
tpchkclidChecks whether a client is normally connected to a server to receive unsolicited messages before sending data used by a UCS process.
tpclrfdTurns off the bit for a socket fd in an internal fdset used by a UCS-type process.
tpclrfd_wTurns off the bit for a socket fd in an internal writable FDSET used by a UCS-type process.
tpforwardForwards a client request to a svc service routine.
tpgetctxSaves a value of a CTX_T structure in a server library to a user variable.
tpgetdbsessionidRetrieves RM session information.
tpgetmaxsvrReturns a maximum server process count.
tpgetmaxuserRetrieves the maximum number of concurrent users of a node to which a server process belongs.
tpgetminsvrReturns the minimum number of server processes.
tpgetmynodeReturns the name and number of a node.
tpgetmysvgnoRetrieves an engaged server group number.
tpgetmysvridReturns a server process ID.
tpgetnodenameRetrieves the node number corresponding to a nodename.
tpgetnodenoRetrieves the node number corresponding to a nodename.
tpgetorgclhReturns the clh number to which a client is connected.
tpgetorgnodeReturns the node number to which a client is connected.
tpgetpeer_ipaddrReturns a peer's IP address (node).
tpgetsvcnameUses a service index to retrieve the name of a service.
tpgetsvrseqnoReturns the serial number of a server process from duplicate server processes.
tpissetfdChecks if data is received in a socket fd in a UCS process.
tpissetfd_wTests a fdset used by a UCS-type process to check if there is any data to be sent to a socket fd specified in a parameter
tpprechkA user callback routine to check the status of a RM. This function is called before a client connects to a Tmax system.
tpregcbSets a routine to be executed when a reply from a server program is received in a UCS type process.
tprelayForwards a service request to another service routine that contains the information of a client that requested a service. It is available only in UCS types of server process.
tpresumetxResumes a currently terminated global transaction. A terminated global transaction can be resumed using tpresumetx() or tpsuspendxt().
returnEnd of a service routine.
tpsavectxInternally manages client information. This function is used in a UCS process.
tpscheduleSleeps until data arrives in a UCS-type server process.
tpsendtocliSends an unsolicited message to a specified client.
tpsetdbsessionidConfigures RM session information.
tpsuspendtxSuspends a currently running global transaction.
tpsvctimeoutA routine called when a service timeout occurs.
tpsvrdoneSets a routine to be executed when a server process goes down.
tpsvrdownUsed to down a UCS-type server process normally.
tpsvrinitInitializes a Tmax server process.
tptsleepWaits for TMM to send a server process termination event.
tpunadvertiseUnadvertises a service provided by a server process from a server.
tpunregcbReconfigures a routine to be executed when a reply to an asynchronous request is received from a server program.
tpuscheduleWaits for data to arrive in a UCS-type server process.
tx_closeCloses a connection with resource managers.
tx_openOpens a connection with resource managers.

1.2.3. Client Functions

FunctionDescription
gettpurcodeReturns a urcode that is set in a urcode service to a client.
tpchkunsolTriggers checking for unsolicited messages.
tpendEnds a connection with a Tmax system.
tpgethostaddrChecks the connectivity status of a Tmax client to a Tmax system or looks up IP/PORT information of a Tmax system.
tpgetunsolReceives and processes messages sent unilaterally without the as request.
tpinitConnects to a Tmax system.
tpresetCloses a current connection immediately.
tpsetunsolSets a routine to execute when an unsolicted message from a server program is received.
tpsetunsol_flagChanges an unsolicited message reception flag.
tpstartStarts a connection to a Tmax system.
tptermTerminates a connection to a Tmax system.
tptobackupConnects to a Tmax backup system.

1.2.4. TCP/IP Gateway Functions

FunctionDescription
chk_extpong_msgChecks a message received from a remote server when checking a ping.
reset_extping_msgPeriodically called to reconfigure a ping message in a TCP/IP gateway.
set_extping_msgConfigures a message to be sent when checking a ping to a local or remote server.

1.2.5. TDL Functions

FunctionDescription
tdlcallCalls the latest version of a dynamic module function.
tdlcall2Calls the latest version of a dynamic module function.
tdlcall2sCalls the latest version of a dynamic module function.
tdlcall2vCalls the latest version of a dynamic module function.
tdlcallvaCalls the latest version of a dynamic module function.
tdlcallva2Calls the latest version of a dynamic module function.
tdlcreateCreates a class instance using a Class Factory in the latest version of a dynamic module. It can be used when a VERSION is set to 4 in a TDL configuration file (tdl.cfg).
tdldestroyDestroys a class instance using a Class Factory in the latest version of a dynamic module. It can be used when a VERSION is set to 4 in a TDL configuration file (tdl.cfg).
tdlendStops maintaining Explicit Version Consistency.
tdlerrorConverts a tdlcall function error to a character string.
tdlresumeResumes a temporarily suspended Explicit Version Consistency.
tdlstartStarts maintaining an Explicit Version Consistency.
tdlsuspendTemporarily suspends the maintenance of an Explicit Version Consistency.
tdlgetseqnoRetrieves a global sequence number.
tdlcloseInitializes a reference count of a module to 0 or releases a module from memory.
tdlloadSearches for a hash table and load libraries, and then saves the corresponding module information in a local cache before calling a tdlcall().
tdlload2Searches for a hash table and load libraries, and then saves the corresponding module information in a local cache before calling a tdlcall().
tdlinitInitially sets shared memory.
tdldoneInitializes shared memory.
tdlfindSearches for a module index.
tdlfind2Searches for a module index.
tdlstatDisplays TDL statistics.
tdlstat2Displays TDL statistics.

1.2.6. Windows Functions

FunctionDescription
WinTmaxAcallSends an asynchronous service request in a multithread environment.
WinTmaxAcall2Sends an asynchronous service request in a multithread environment.
WinTmaxEndCloses a connection with a Tmax system.
WinTmaxSendSends data.
WinTmaxSetContextSpecifies a Windows handle and message type.
WinTmaxStartConnects to a Tmax system in a multi-Windows environment.

1.2.7. Other Functions

FunctionDescription
tlog_closeCloses a log file as a function that analyze transaction logs.
tlog_findFinds an entry from a transaction log file that matches specified information.
tlog_nodenoFinds the number of a node in which a transaction starts using XID.
tlog_openOpens a log file as a function that analyzes transaction logs.
UsiginitInitializes a Tmax signal handler as a function used to set macros, which is necessary for user signal handling.
UsignalSets macros for user signal handling. It is not used in a Windows system environment.
UunixerrA variable that sets an integrated error code when an error occurs during a system call.
Uunix_errWrites a system error type to a stderr when an ATMI API call fails and a tperrno is set to TPEOS.
UstrerrorReturns an integrated error message for a system error code (errno).