Overview

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

1. Commands

The following are commands available in Tmax.

Command Description

cfl

Compiles a Tmax text configuration file into a binary file.

etmm / eclh

Improves performance when an event-driven communication method uses more fds than an existing communication method.

fdlc

Compiles a field key table.

gst

Creates a service table by referring to a binary Tmax configuration file.

mkcli

Creates a Tmax client module.

mkacl

Creates an access control list (ACL).

mkgrp

Creates a user group.

mkpw

Manages a password file.

mksvr

Creates a Tmax server module.

racd

Centralizes the management of nodes in a distributed multi-node environment.

racdr

Executes commands and transfers files across nodes in a multi-node, multi-domain configuration.

sdlc

Compiles a file that defines structures.

svcrpt

Analyzes and prints log records related to a service execution while a Tmax system operates.

tdlclean

Removes outdated libraries and unnecessary files from the run directory.

tdlinit

Initializes TDL shared memory and dynamic modules.

tdlnm

Retrieves a list of functions to be automatically exported to a specified library.

tdlrm

Removes shared memory when TDL is no longer used.

tdlseqno

Retrieves the sequence number of a specific module or function.

tdlshm

Retrieves the TDL shared memory information or enables/disables statistics monitoring or modules.

tdlsync

Synchronizes backup files with TDL shared memory.

tdltrace

Retrieves TDL configuration and statistics data.

tdlupdate

Updates a specified dynamic module.

tencrypt

Encrypts the OPENINFO section in the configuration file.

tmadmin

Manages Tmax systems.

tmapm

Redefines a signal alarm for a service or provides a service timeout for a service that cannot use a signal alarm.

tmaxlibver

Retrieves the Tmax library version.

tmboot

Starts a Tmax system fully or partially.

tmd

Simulates a client for testing a server program.

tmdown

Shuts down a Tmax system fully or partially.

tmmbfgen

Converts a text-based service information file into a binary file.

tmaxtrace

Enables runtime tracing for an application.

tmsnmpd

Retrieves the Tmax configuration and performance data using the standard SNMP protocol.

tperr

Retrieves detailed error information using the Tmax-defined number and type of an error.

uncfl

Converts a binary Tmax configuration file (tmconfig) into a text file.

untmmbfgen

Converts a binary service information file into a text file.

xwsdlgen

Creates a WSDL document, which defines web services.

2. Functions

The following are functions available in Tmax.

2.1. Functions supported both in servers and clients

Function Description

gettperrno

Returns the error code (errno) set when the Tmax system is called.

tmax_chk_conn

Checks the connection status of a client by checking the execution status of tpstart(), socket status, and message transmission.

tmax_gq_count

Returns the number of data items stored in GQ.

tmax_gq_get

Retrieves data from GQ using a specified key.

tmax_gq_getkeylist

Retrieves a list of keys in GQ.

tmax_gq_keygen

Generates and retrieves system keys.

tmax_gq_purge

Deletes data in GQ.

tmax_gq_put

Stores data in GQ using the key and value.

tmax_get_sessionid

Returns the current session ID.

tmax_keylist_count

Returns the number of key lists from the keylist handle.

tmax_keylist_free

Releases keylist handle from memory or other resources.

tmax_keylist_getakey

Retrieves a key with a specified number (the n-th key) from the keylist handle.

tmax_make_unique_spri_in_domain

Generates a spri value that is unique in a domain.

tmax_sq_count

Returns the number of data items stored in SQ.

tmax_sq_get

Stores data in the session queue.

tmax_sq_getkeylist

Retrieves the key list in the current session SQ.

tmax_sq_keygen

Generates and retrieves system keys.

tmax_sq_purge

Deletes data in SQ.

tmax_sq_put

Stores server data in the session queue.

tmaxlastsvc

Retrieves the most recently executed service. It returns the name of a service that encounters an error or the last service that executes the routine.

tmaxreadenv

Reads information about a system accessed from a file and redefines the environment variables.

tp_sleep

Waits for incoming data in seconds.

tp_usleep

Waits for incoming data in microseconds.

tpabort

Rolls back a global transaction.

tpacall

Sends an asynchronous service request.

tpacallsvg

Asynchronously sends a service request to a service included in a specific server group in a server group environment grouped by a COUSIN.

tpalivechk

Displays the connection status of a client by checking a socket status.

tpalloc

Allocates a typed buffer.

tpbegin

Sets a transaction time and begins a global transaction.

tpbroadcast

Sends unsolicited messages to clients registered in the Tmax system.

tpcall

Sends/receives synchronous service requests.

tpcallsvg

Calls a service belonging to a specific server group from servers and clients.

tpcancel

Cancels a response.

tpcommit

Commits a global transaction.

tpconnect

Allows a program to establishes connection with an interactive service (svc).

tpdeq

Loads data from RQ.

tpdeq_ctl

Loads data from RQ while supporting transactions.

tpdiscon

Disconnects an interactive communication.

tpenq

Stores data in RQ.

tpenq_ctl

Stores data in RQ while supporting transactions.

tperrordetail

Retrieves detailed information about an error that occurs when a server or client calls the Tmax system.

tpextsvcinfo

Provides detailed information about data read from RQ through tpdeq().

tpextsvcname

Displays service names stored in RQ.

tpfree

Releases memory allocated to typed buffers.

tpget_timeout

Returns the block timeout value.

tpgetactivesvr

Retrieves a list of currently active servers.

tpgetcliaddr

Retrieves the IP address and port of a client connected to the Tmax system.

tpgetcliaddr_ipv6

Retrieves the IP address and port of a client connected to the Tmax system. This function is used in an IPv6 environment.

tpgetclid

Retrieves the number of a client connected to the Tmax system.

tpgetctxt

Returns the current context.

tpgetenv

Returns the value of an environment variable registered as 'name'.

tpgetlev

Checks transaction mode.

tpgetnodelist

Retrieves a list of nodes connected in the Tmax system.

tpgetpeername

Retrieves a connected peer’s socket address.

tpgetrcahseqno

Returns the RCAH process number (same as the tpgetsvrseqno API).

tpgetrcainfo

Provides RCAH thread information.

tpgetrply

Receives a response to an asynchronous service request.

tpgetsockname

Receives the socket address used internally in the Tmax system.

tpgetsprlist

Retrieves the index of a server process to which a relevant service belongs. It is used to call a service at the server process level.

tpgetsvglist

Returns information about a server group to which a service belongs and other server groups bound by COUSIN with that server group.

tpgetsvglist_bynode

Retrieves a list of server groups matching the specified node name, among those providing the specified service.

tpgprio

Displays the priority of a service request.

tpmcall

Calls services of servers in all server groups bound by COUSIN.

tpmcallx

API 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.

tpnotify

Sends unsolicited messages to clients specified by the server.

tppost

Triggers a specific event and sends messages.

tpputenv

Re-configures an environment variable value.

tpqstat

Sends a request for statistics of data stored in RQ.

tpqsvcstat

Sends a request for statistics of a specific service in RQ. It retrieves statistics of data accumulated in RQ.

tprealloc

Retrieves the number of data items stored in RQ.

tprecv

Receives messages in an interactive communication.

tpreissue

Reissues a request in the RQ’s fail queue to the request queue.

tpremoteconnect

Establishes a connection with a remote node via TCP.

tpscmt

Resets the commit mode.

tpsend

Sends messages in an interactive communication.

tpset_timeout

Sets a block timeout.

tpsetfd

Registers the socket FD in the scheduler of the UCS process.

tpsleep

Waits for incoming data.

tpspracall

Calls a service for a specific server process with indexes obtained by tpgetsprlist().

tpspracall2

Calls a service for a specific server process with the specified sequential number from starti obtained through tpgetsprlist(). This function is used in DYN type servers.

tpsprio

Specifies the priority of a service request.

tpsetctxt

Sets the current context.

tpstrerror

Displays the error message corresponding to the error number.

tpsubqname

Returns the queue name corresponding to the sub queue number.

tpsubscribe

Subscribes to a specific event message.

tptypes

Retrieves the information about the type and subtype of a buffer.

tpunsubscribe

Unsubscribes from a specific event message.

tuxgetenv

Returns an environment variable value.

tuxputenv

Applies an environment variable.

tuxreadenv

Reads an environment variable from a file.

tx_begin

Begins a global transaction.

tx_commit

Commits a global transaction.

tx_info

Returns information about a global transaction.

tx_rollback

Rolls back a global transaction.

tx_set_commit_return

Sets the behavior of commit_return.

tx_set_transaction_control

Sets the behavior of transaction_control with the control value.

tx_set_transaction_timeout

Sets the behavior of transaction_timeout with the timeout value.

ulogsync

Stores the ulog of the memory buffer in a file.

userlog

Stores the ulog in the memory buffer.

UserLog

Stores the ulog in a file directly.

2.2. Server Functions

Function Description

_tmax_check_license

Validates licenses of AnyLink and OpenFrame.

_tmax_event_handler

A callback function triggered by the slog when the SVRTYPE is set to EVT_SVR.

_tmax_main

Used for a user program containing main().

CliWatcherCallback

A callback function used in UCS processes to get notified of a client shutdown from tpsetcliwatcher.

tmadmin

Displays the statistics information retrieved by tmadmin, the Tmax system administrative tool.

tmax_get_db_passwd

Retrieves the password matching the username of the database to which Tmax is currently connected.

tmax_get_db_tnsname

Retrieves the tnsname of the database to which Tmax is currently connected.

tmax_get_db_usrname

Retrieves the username of the database to which Tmax is currently connected.

tmax_get_my_unique_spri_in_domain

Retrieves the spri value that is unique in the domain where the process is running.

tmax_get_svccnt

Returns the number of services in the server.

tmax_get_svclist

Returns the list of services in the server.

tmax_is_restarted

Displays a server restart status after a server process failure. This function can be called from a Tmax AP Server routine.

tmax_is_xa

Checks whether the server is XA or NON-XA.

tmax_my_rminfo

Retrieves the OPENINFO setting information for the server group.

tmax_my_svrinfo

Retrieves the system configuration information for the server process.

tmgetsmgid

Retrieves the current group ID (GID). Supports the SysMaster trace feature.

tmget_smtrclog

Stores logging data in a structure buffer.

tmget_smtrclog_count

Returns the number of data items to be logged.

tpadvertise

Allows a server to advertise the service that it offers.

tpcancelctx

Removes the contents of a CTX_T structure in a server library.

tpchkclid

Checks whether the client is correctly connected to the server to receive unsolicited messages before sending data used by the UCS process.

tpclrcliwatcher

Cancels detecting shutdown events of clients registered with tpsetcliwatcher(). Used in UCS processes.

tpclrfd

Turns off the bit for a socket fd in an internal fdset used by UCS processes.

tpclrfd_w

Turns off the bit for a socket fd in an internal writable FDSET used by UCS processes.

tpforward

Forwards a service request to another service routine.

tpgetcliinfo

Retrieves information about the client with the specified clid from the clients connected to the Tmax system.

tpgetctx

Saves a value of a CTX_T structure in a server library to a user variable.

tpgetdbsessionid

Retrieves RM session information.

tpgetfclid

Retrieves the number of the client that initiates the first service in the Tmax system.

tpgetmaxsvr

Returns the maximum number of server processes that can run.

tpgetmaxuser

Retrieves the maximum number of concurrent users of the node to which the server process belongs.

tpgetminsvr

Retrieves the minimum number of server processes to run.

tpgetmynode

Retrieves the name and number of a specific node in a server.

tpgetmysvgno

Returns the number of the server group currently connected to.

tpgetmysvrid

Returns the server process ID.

tpgetnodename

Returns the name of the node specified by the server.

tpgetnodeno

Retrieves the number of the node with the specified nodename in the server.

tpgetorgclh

Retrieves the CLH number to which the client is currently connected to.

tpgetorgnode

Returns the number of the node to which the client is currently connected to.

tpgetpeer_ipaddr

Returns a connected peer’s IP address (node).

tpgetsvcname

Retrieves the service name from the service index.

tpgetsvrseqno

Returns the serial number of a server process from duplicate server processes.

tpissetfd

Checks if data is received in a socket fd in a UCS process.

tpissetfd_w

Tests a fdset used by a UCS-type process to check if there is any data to be sent to a socket fd specified by a parameter.

tpprechk

A user callback routine to check the status of RM. This function is called before the client connects to the Tmax system.

tpregancb

Registers a callback function to receive events generated by the admnoti command.

tpregcb

Sets a routine to receive responses to asynchronous requests in UCS type processes from a server program.

tprelay

Forwards a service request to another service routine that contains the information of a client that requested that service. Used in UCS server process.

tpresumetx

Resumes a currently terminated global transaction. A terminated global transaction can be resumed using tpresumetx() or tpsuspendxt().

tpreturn

Terminates a server’s service.

tpsavectx

Internally manages client information. This function is used in a UCS process.

tpschedule

Waits for incoming data in a UCS server process.

tpsendtocli

Sends unsolicited messages to a specified client.

tpsetcliwatcher

Detects shutdown of a specified client. Used in UCS processes.

tpsetdbsessionid

Retrieves RM session information.

tpsetsvctimeout

Sets a service timeout in a server.

tpsuspendtx

Suspends a global transaction.

tpsvctimeout

Indicates a service timeout occurs.

tpsvrdone

Calls the routine of a Tmax server process shutdown.

tpsvrdown

Shuts down a server process.

tpsvrinit

Initializes a Tmax server process.

tpsvrthrdone

Terminates service threads before tpsvrdone is executed when server processes shut down in a multi-threaded, multi-context server configuration.

tpsvrthrinit

Initializes threads after the tpsvrinit function is executed in a multi-threaded, multi-context server configuration.

tptsleep

Waits for a server process shutdown event from TMM.

tpunadvertise

Unadvertises a service provided by a server process.

tpunregancb

Unadvertises a callback function that receives events generated by the admnoti command.

tpunregcb

Resets a routine to receive responses to asynchronous requests in UCS server processes.

tpuschedule

Waits for incoming data in a UCS server process.

tx_close

Closes connections with resource managers.

tx_open

Establishes connections with relevant resource managers.

2.3. Client Functions

Function Description

gettpurcode

Returns the specified urcode to the urcode service.

tpchkunsol

Calls a function to check for and handle unsolicited messages.

tpend

Disconnects the client from the Tmax system.

tpgethostaddr

Checks the client connection to the Tmax system or retrieves the IP address and port of the connected Tmax system.

tpgetunsol

Handles unsolicited messages that are received without client requests.

tpinit

Establishes connection with the Tmax system.

tpreset

Disconnects a client.

tpsetunsol

Sets a routine to handle unsolicited messages.

tpsetunsol_flag

Changes the flag setting for receiving unsolicited messages.

tpstart

Connects to the Tmax system.

tpterm

Disconnects from the Tmax system.

tptobackup

Connects to a backup Tmax system.

2.4. TCP/IP Gateway Functions

Function Description

chk_extpong_msg

Checks a message received from a remote server during a ping test.

reset_extping_msg

Periodically called to reconfigure a ping message in a TCP/IP gateway.

set_extping_msg

Configures a message to be sent when checking a ping to a local or remote server.

2.5. TDL Functions

Function Description

tdlcall

Calls the latest version of a dynamic module function.

tdlcall2

Calls the latest version of a dynamic module function.

tdlcall2s

Calls the latest version of a dynamic module function.

tdlcall2v

Calls the latest version of a dynamic module function.

tdlcallva

Calls the latest version of a dynamic module function.

tdlcallva2

Calls the latest version of a dynamic module function.

tdlclose

Resets the count of references for the module to 0, or directly releases the module from memory.

tdlcreate

Creates a class instance using a class factory in the latest version of a dynamic module. Available when the version is set to 4 (VERSION=4) in the TDL configuration file (tdl.cfg).

tdldestroy

Destroys a class instance using a class factory in the latest version of a dynamic module. Available when the version is set to 4 (VERSION=4) in the TDL configuration file (tdl.cfg).

tdldone

Initializes shared memory.

tdlend

Ends explicit version consistency maintenance.

tdlerror

Converts an error from tdlcall() into a text string.

tdlfind

Finds the index of a module.

tdlfind2

Finds the index of a module.

tdlgetseqno

Retrieves the global sequence number.

tdlinit

Initializes shared memory.

tdlload

Performs the hashtable search and library loading before tdlcall() is executed, storing the module information in the local cache in advance.

tdlload2

Performs the hashtable search and library loading before tdlcall() is executed, storing the module information in the local cache in advance.

tdlresume

Resumes explicit version consistency maintenance.

tdlstart

Starts explicit version consistency maintenance.

tdlstat

Displays TDL statistical information.

tdlstat2

Displays TDL statistical information.

tdlsuspend

Suspends explicit version consistency maintenance.

Function Description

WinTmaxAcall

Sends an asynchronous service request in a multi-threaded environment.

WinTmaxAcall2

Sends an asynchronous service request in a multi-threaded environment.

WinTmaxEnd

Closes connection with the Tmax system.

WinTmaxSend

Sends data.

WinTmaxSetContext

Specifies the Windows handle and message type.

WinTmaxStart

Connects to the Tmax system in a multi-Windows environment.

2.7. Other Functions

Function Description

tlog_close

Closes a transaction log file. Used for transaction log analysis.

tlog_find

Searches for an entry that matches the specified information in a transaction log file.

tlog_nodeno

Retrieves the node number where a transaction started, using a given XID.

tlog_open

Opens a transaction log file. Used for transaction log analysis.

Usiginit

Initializes the Tmax signal handler.

Usignal

Sets macros for user-defined signal handling. Not available in Windows environments.

Uunixerr

Sets an integrated error code when an error occurs while invoking a system call.

Uunix_err

Prints a system error message to stderr when an ATMI API call fails and tperrno is set to TPEOS.

Ustrerror

Returns the integrated error message corresponding to a system error code (errno).

tmax_tencrypt

Provides a Tmax API for encryption and decryption.