![]() |
![]() |
|
|
Step 2: Building Servers in bankapp
buildserver(1) puts together an executable ATMI server built on the BEA Tuxedo ATMI main(). Options identify the names of the output file, the input files provided by the application, and various libraries that permit you to run a BEA Tuxedo system application in a variety of ways.
buildserver invokes the cc command. The environment variables CC and CFLAGS can be set to name an alternative compile command and to set flags for the compile and link edit phases. The buildserver command is used in bankapp.mk to compile and build each server in the banking application. The following sections describe the six bankapp servers:
How to Build ACCT Server
The ACCT server is derived from a file called ACCT.ec that contains the code for the OPEN_ACCT and CLOSE_ACCT functions. It is created in two steps. ACCT.ec is first compiled to an ACCT.o file, which is then specified to the buildserver command so that any compile-time errors can be identified and resolved.
buildserver -r TUXEDO/SQL \
-s OPEN_ACCT -s CLOSE_ACCT \
-o ACCT \
-f ACCT.o -f appinit.o -f util.o
Note: The backslash in the preceding command-line entry is a documentation convention that indicates a line break for presentation purposes only. You should enter the command and options on one line.
Following is an explanation of the buildserver command-line options:
To summarize, the options specified on the buildserver command line used to create the ACCT server performed the following functions:
Note: The appinit.c file contains the system-supplied tpsvrinit() and tpsvrdone(). (Refer to tpservice(3c) reference pages for an explanation of how these routines are used.)
How to Build the BAL Server
The BAL server is derived from a file called BAL.ec that contains the code for the ABAL, TBAL, ABAL_BID, and TBAL_BID functions. As with ACCT.ec, the BAL.ec is first compiled to a BAL.o file before being supplied to the buildserver command so that any compile-time errors can be identified and resolved.
buildserver -r TUXEDO/SQL \
-s ABAL -s TBAL -s ABAL_BID -s TBAL_BID\
-o BAL \
-f BAL.o -f appinit.o
Note: The backslash in the preceding command-line entry is a documentation convention that indicates a line break for presentation purposes only. You should enter the command and options on one line.
How to Build the BTADD Server
The BTADD server is derived from a file called BTADD.ec that contains the code for the BR_ADD and TLR_ADD functions. The BTADD.ec is compiled to a BTADD.o file before being supplied to the buildserver command.
buildserver -r TUXEDO/SQL \
-s BR_ADD -s TLR_ADD \
-o BTADD \
-f BTADD.o -f appinit.o
Note: The backslash in the preceding command-line entry is a documentation convention that indicates a line break for presentation purposes only. You should enter the command and options on one line.
How to Build the TLR Server
The TLR server is derived from a file called TLR.ec that contains the code for the DEPOSIT, WITHDRAWAL, and INQUIRY functions. The TLR.ec is also compiled to a TLR.o file before being supplied to the buildserver command.
buildserver -r TUXEDO/SQL \
-s DEPOSIT -s WITHDRAWAL -s INQUIRY \
-o TLR \
-f TLR.o -f util.o -f -lm
Note: The backslash in the preceding command-line entry is a documentation convention that indicates a line break for presentation purposes only. You should enter the command and options on one line.
Note: In this example, the -f option is used to pass an option (-lm) to the cc command, which is invoked by buildserver. The -lm argument to -f causes the math libraries to be linked in at compile time.
(Refer to cc(1) in the UNIX System V User's Reference Manual for a complete list of compile-time options.)
How to Build the XFER Server
The XFER server is derived from a file called XFER.c that contains the code for the TRANSFER function. The XFER.c is also compiled to an XFER.o file before being supplied to the buildserver command.
buildserver -r TUXEDO/SQL \
-s TRANSFER \
-o XFER \
-f XFER.o -f appinit.o
Note: The backslash in the preceding command-line entry is a documentation convention that indicates a line break for presentation purposes only. You should enter the command and options on one line.
Servers Built in the bankapp.mk File
The topics on creating the bankapp servers are important to your understanding of how the buildserver command is specified. However, in actual practice you are apt to incorporate the build into a makefile; that is the way it is done in bankapp.
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|