OpenTP1 Version 7

Programming Reference C Language



Summary of amendments

1. Creating Application Programs
1.1 Coding application program
1.1.1 Relationship between application programs and functions
1.1.2 Coding rules
1.2 Creating application programs (TCP/IP)
1.2.1 Procedure for creating application programs
1.2.2 Creating stubs
1.2.3 Creating stub source file
1.2.4 stbmake - Stub source file creation
1.2.5 Compiling and linking application program
1.3 Creating XATMI interface application programs (TCP/IP, OSI TP)
1.3.1 Procedure for creating XATMI-interfaced application programs
1.3.2 Creating stubs for XATMI interface
1.3.3 Creating stub source files for XATMI interface
1.3.4 stbmake - Stub source file creation for XATMI interface
1.3.5 tpstbmk - Creation of an XATMI interface stub OSI TP communication
1.4 Executing application programs
1.4.1 Starting and terminating each application program
1.4.2 Operating environment of application programs started by OpenTP1
1.4.3 Application's environment variables

2. Syntax of OpenTP1 Library Functions
Format for explaining functions
Creating main and service functions
Create a main function (SUP, SPP, MHP)
Create a service function (SPP)
Create a service function (MHP)
System operation management (dc_adm_~)
dc_adm_call_command - Execute an operation command
dc_adm_complete - Report the completion of user server start processing
dc_adm_status - Report the status of a user server
Multinode facility (dc_adm_get_~)
dc_adm_get_nd_status - Acquire the status of a specified OpenTP1 node
dc_adm_get_nd_status_begin - Start acquiring the status of an OpenTP1 node
dc_adm_get_nd_status_done - Terminate acquiring the status of an OpenTP1 node
dc_adm_get_nd_status_next - Acquire the status of an OpenTP1 node
dc_adm_get_nodeconf_begin - Start acquiring a node identifier
dc_adm_get_nodeconf_done - Terminate acquiring a node identifier
dc_adm_get_nodeconf_next - Acquire a node identifier
dc_adm_get_node_id - Acquire the node identifier of the local node
dc_adm_get_sv_status - Acquire the status of a specified user server
dc_adm_get_sv_status_begin - Start acquiring the status of a user server
dc_adm_get_sv_status_done - Terminate acquiring the status of a user server
dc_adm_get_sv_status_next - Acquire the status of a user server
DAM file service (dc_dam_~)
dc_dam_bseek - Seek a physical file block
dc_dam_close - Close a logical file
dc_dam_create - Allocate a physical file
dc_dam_dget - Input directly a physical file block
dc_dam_dput - Output directly a physical file block
dc_dam_end - Terminate using an unrecoverable DAM file
dc_dam_get - Input a physical file block
dc_dam_hold - Shut down a logical file
dc_dam_iclose - Close a physical file
dc_dam_iopen - Open a physical file
dc_dam_open - Open a logical file
dc_dam_put - Output a physical file block
dc_dam_read - Input a logical file block
dc_dam_release - Release a logical file from the shutdown state
dc_dam_rewrite - Update a logical file block
dc_dam_start - Start using an unrecoverable DAM file
dc_dam_status - Reference the status of a logical file
dc_dam_write - Output a logical file block
IST service (dc_ist_~)
dc_ist_close - Close an internode shared table
dc_ist_open - Open an internode shared table
dc_ist_read - Input an internode shared table record
dc_ist_write - Output an internode shared table record
User journal acquisition (dc_jnl_~)
dc_jnl_ujput - Acquire a user journal
Lock for resources (dc_lck_~)
dc_lck_get - Enable locking of a resource
dc_lck_release_all - Release all the resources from lock
dc_lck_release_byname - Release resource from lock specified by name
Audit log output (dc_log_audit_~)
dc_log_audit_print - output audit log data
Output message log (dc_log~)
dc_logprint - Output message log
Message exchange processing (dc_mcf_~)
dc_mcf_adltap - Delete an application timer start request
dc_mcf_ap_info - Report the application information
dc_mcf_ap_info_uoc - Report the application information to user exit routines
dc_mcf_close - Close the MCF environment
dc_mcf_commit - Commit an MHP
dc_mcf_contend - Terminate continuous-inquiry-response processing
dc_mcf_execap - Activate an application program
dc_mcf_mainloop - Start an MHP service
dc_mcf_open - Open the MCF environment
dc_mcf_receive - Receive a message
dc_mcf_recvsync - Receive a synchronous message
dc_mcf_reply - Send a response message
dc_mcf_resend - Resend a message
dc_mcf_rollback - Enable MHP rollback
dc_mcf_send - Send a message
dc_mcf_sendrecv - Exchange a synchronous message
dc_mcf_sendsync - Send a synchronous message
dc_mcf_tactcn - Establish a connection
dc_mcf_tactle - Release a logical terminal from shutdown status
dc_mcf_tdctcn - Release a connection
dc_mcf_tdctle - Shut down a logical terminal
dc_mcf_tdlqle - Delete a logical terminal's output queue
dc_mcf_tempget - Accept temporary-stored data
dc_mcf_tempput - Update temporary-stored data
dc_mcf_timer_cancel - Cancel user timer monitoring
dc_mcf_timer_set - Set user timer monitoring
dc_mcf_tlscn - Acquire a connection status
dc_mcf_tlscom - Acquire the status of MCF communication services
dc_mcf_tlsle - Acquire a logical terminal status
dc_mcf_tlsln - Acquire the acceptance status for a server-type connection establishment request
dc_mcf_tofln - Stop accepting server-type connection establishment requests
dc_mcf_tonln - Start accepting server-type connection establishment requests
Performance verification trace (dc_prf_~)
dc_prf_get_trace_num - Report the sequential number for an acquired performance verification trace
dc_prf_utrace_put - Acquire user-specific performance verification traces
Remote API facility (dc_rap_~)
dc_rap_connect - Establish a connection with a RAP-processing listener
dc_rap_disconnect - Release a connection with a RAP-processing listener
Remote procedure call (dc_rpc_~)
dc_rpc_call - Request a remote service
dc_rpc_call_to - Invoke a remote service with a communication destination specified
dc_rpc_close - Terminate an application program
dc_rpc_cltsend - Report data to CUP unidirectionally
dc_rpc_discard_further_replies - Reject the receiving of processing results
dc_rpc_discard_specific_reply - Reject acceptance of particular processing results
dc_rpc_get_callers_address - Acquire the node address of a client UAP
dc_rpc_get_error_descriptor - Acquire the descriptor of an asynchronous response-type RPC request which has encountered an error
dc_rpc_get_gateway_address - Acquire the node address of a gateway
dc_rpc_get_service_prio - Reference the schedule priority of a service request
dc_rpc_get_watch_time - Reference the service response waiting interval
dc_rpc_mainloop - Start an SPP service
dc_rpc_open - Start an application program
dc_rpc_poll_any_replies - Receive processing results in asynchronous mode
dc_rpc_service_retry - Retry a service function
dc_rpc_set_service_prio - Set a schedule priority of a service request
dc_rpc_set_watch_time - Update a service response waiting interval
Real-time statistical information service (dc_rts_~)
dc_rts_utrace_put - Acquire real-time statistical information for arbitrary section
TAM file service (dc_tam_~)
dc_tam_close - Close a TAM table
dc_tam_delete - Delete a TAM table record
dc_tam_get_inf - Acquire TAM table status
dc_tam_open - Open a TAM table
dc_tam_read - Input a TAM table record
dc_tam_read_cancel - Cancel the input of a TAM table record
dc_tam_rewrite - Update a TAM table record on the assumption of input
dc_tam_status - Acquire TAM table information
dc_tam_write - Update/add a TAM table record
Transaction control (dc_trn_~)
dc_trn_begin - Start a transaction
dc_trn_chained_commit - Enable commitment in chained mode
dc_trn_chained_rollback - Enable rollback in chained mode
dc_trn_info - Report the information about the current transaction
dc_trn_unchained_commit - Enable commitment in unchained mode
dc_trn_unchained_rollback - Enable rollback in unchained mode
Online tester management (dc_uto_~)
dc_uto_test_status - Report the test status of a user server

3. Syntax of OpenTP1 Library Functions (Message Log Reporting)
Message log reporting (dc_log_~)
dc_log_notify_close - Terminate message log reception
dc_log_notify_open - Start message log reception
dc_log_notify_receive - Receive message logs
dc_log_notify_send - Send user-kept message logs

4. X/Open-compliant Application Programming Interface
X/Open-compliant function
XATMI-interfaced application programming interface (tp~)
tpacall - Send a service request
tpadvertise - Advertise a service name
tpalloc - Allocate a typed buffer
tpcall - Send a service request and synchronously await its reply
tpcancel - Cancel a call descriptor for an outstanding reply
tpconnect - Establish a conversational service connection
tpdiscon - Terminate a conversational service connection abortively
tpfree - Free a typed buffer
tpgetrply - Get a reply from a previous service request
tprealloc - Change the size of a typed buffer
tprecv - Receive a message in a conversational connection
tpreturn - Return from a service routine
tpsend - Send a message in a conversational connection
tpservice - Template for service routines
tptypes - Determine information about a typed buffer
tpunadvertise - Unadvertise a service name
TX-interfaced application programming interface (tx_~)
tx_begin - Begin a transaction
tx_close - Close a set of resource managers
tx_commit - Commit a global transaction
tx_info - Return global transaction information
tx_open - Open a set of resource managers
tx_rollback - Roll back a global transaction
tx_set_commit_return - Set commit_return characteristic
tx_set_transaction_control - Set transaction_control characteristic
tx_set_transaction_timeout - Set transaction_timeout characteristic

5. Syntax of OpenTP1 Library Functions (Association Status Notification)
Association operation (dc_xat_~)
dc_xat_connect - Establish an association
Formats of receive communication events

6. X/Open-compliant Inter-application Communication (TxRPC)
6.1 Preparation procedures for TxRPC communication
6.1.1 Procedures for using IDL-only TxRPC
6.2 Notes on creating application programs
6.3 Creating interface definition language files (IDL files)
6.3.1 Syntax rules
6.3.2 Interface definition format
6.3.3 Syntax of interface definition file
6.4 Syntax of interface definition header
Interface definition header
6.5 Interface definition body
Import declaration
Constant declaration
Type declaration
Operation declaration
Parameter declaration
6.6 Attributes
version attribute
pointer_default attribute
transaction_mandatory attribute
transaction_optional attribute
in attribute
out attribute
Pointer attribute
6.7 Data types
Integer type (basic data type)
Floating-point type (basic data type)
Character type (basic data type)
Boolean type (basic data type)
Byte type (basic data type)
void type (basic data type)
Error status type (basic data type)
Multi-language type (basic data type)
Structure (configuration data type)
6.8 Type declarators
Character string
6.9 Attribute configuration language
6.10 IDL compiler (txidl command)
txidl (IDL compiler)
6.11 TxRPC error codes

7. Coding Samples
7.1 Coding samples for client/server configuration UAPs (SUP, SPP DAM access)
7.2 Coding samples for client/server configuration UAPs (SPP TAM access)
7.3 Coding samples for message exchange configuration UAPs (MHP)
7.4 Coding samples for X/Open-compliant UAPs
7.4.1 XATMI interface samples
7.4.2 TX interface sample
7.5 TxRPC examples (templates created by the IDL compiler)
7.5.1 Outline of creation procedures
7.5.2 Examples of Files

8. Reference for Application Activation
Function format of the user exit routine that determines whether to inherit the timer-start settings
Structure format of mcf event that reports discarding of a timer-start message (ERREVT4)

A. Using OpenTP1 Remote Procedure Calls and XATMI-interfaced Functions in Combination
A.1 Modes of combined use
A.2 Creating stubs of application programs that are used together
A.3 Callable XATMI interface functions
B. Changes to the Interfaces (for Migrating from Version 6 or Earlier)
B.1 Message transmission interfaces
B.2 User exit routines
B.3 MCF event interfaces
B.4 Coding example for the MHP service function