OpenTP1 Version 7 Programming Reference C Language

[Contents][Index][Back][Next]

1.2.5 Compiling and linking application program

For details on how to compile and link UAPs, see the reference documentation for the OS being used.

Organization of this subsection
(1) Compilation
(2) Linkage
(3) Notes

(1) Compilation

To create the object file of a UAP written in C language, compile the source program with the C compiler. Also, use the C compiler to compile the stub source program.

(2) Linkage

The following notes (#1 to #3) apply to files treated in (a) to (d) below.

#1:
The object file for transaction control is required to execute transactions that access the resource manager via the XA interface. Note that any resource manager provided by OpenTP1 is accessed by the XA interface. An object file for transaction control is created by using an OpenTP1 command (trnmkobj command). For details on the trnmkobj command, see the manual OpenTP1 Operation.

#2:
The object file provided by resource manager is required to access the resource manager. The following arguments can be specified in the linkage command to link object files provided by OpenTP1:
Arguments for using the message exchange facility: -lmcf and -lmnet
Argument for using the DAM access facility: -ldam
Argument for using the TAM access facility: -ltam
Arguments for using the ISAM facility: -lismb, -lisam, and -lrsort
Argument for using the message queuing facility: -lmqa
For details on how to link object files for a non-Hitachi resource manager, see the documentation for the resource manager.

#3:
The object file provided by the online tester is required to use the dc_uto_test_status function, which reports the user server test status. The following argument is specified to link the object file for the online tester:
Argument for reporting the user server test status: -luto
(a) Files to be linked to SPP and MHP

The executable file of an SPP or MHP is linked to the following files when it is created:

(b) Files to be linked to SUP

The executable file of an SUP is linked to the following files when it is created:

(c) Files to be linked to UAP that handles offline work

The executable file of UAP that handles offline work is linked to the following files when it is created:

(d) Files to be linked to an SPP or MHP that dynamically loads service functions

When the executable file of an SPP or MHP that dynamically loads service functions is created, it is linked to the following files:

In addition to the above files, the following files are required when the SPP also uses a service search that employs a stub:

(3) Notes

If the OS is HP-UX, always specify immediate as the bind mode at linkage. If an executable file created as a bind mode other than immediate is used as an OpenTP1 UAP, the system operation is undefined. Use the OS chatr command to check whether the bind mode for the created UAP is immediate.