BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Programming   |   Topic List   |   Previous   |   Next   |   Contents

   Programming a BEA Tuxedo Application Using COBOL

Building Servers

To build an executable server, compile your application service subroutines with the BEA Tuxedo System server adaptor and all other referenced files using the buildserver(1) command with the -C option.

Note: The BEA Tuxedo server adaptor accepts messages, dispatches work, and manages transactions (if transactions are enabled).

Use the following syntax for the buildserver command.

buildserver -C -o filename -f filenames -l filenames -s -v

The following table describes the buildserver command-line options.

buildserver Command-Line Options

This Option . . .

Allows You to Specify the . . .

-o filename

Name of the executable output file. The default is SERVER.

-f filenames

List of files that are link edited before the BEA Tuxedo system libraries. You can specify the -f option more than once, and multiple filenames for each occurrence of -f. If you specify a COBOL program file (file.cbl), it is compiled before it is linked. You can specify other object files (file.o) separately, or in groups in an archive file (file.a).

-l filenames

List of files that are link edited after the BEA Tuxedo system libraries. You can specify the -l option more than once, and multiple filenames for each occurrence of -l. If you specify a COBOL program file (file.cbl) , it is compiled before it is linked. You can specify other object files (file.o) separately, or in groups in an archive file (file.a).

-r filenames

List of resource manager access libraries that are link edited with the executable server. The application administrator is responsible for predefining all valid resource manager information in the $TUXDIR/updataobj/RM file using the buildtms(1) command. You can specify only one resource manager. Refer to Setting Up a BEA Tuxedo Application for more information.

-s [service:]routine

Name of service or services offered by the server and the name of the routine that performs each service. You can specify the -s option more than once, and multiple services for each occurrence of -s. The server uses the specified service names to advertise its services to clients.

Typically, you should assign the same name to both the service and the routine that performs that service. Alternatively, you can specify any names. To assign names, use the following syntax: service:routine.

Note: The BEA Tuxedo libraries are linked in automatically. You do not need to specify the BEA Tuxedo library names on the command line.

The order in which you specify the library files to be link edited is significant: it depends on the order in which routines are called and which libraries contain references to those functions.

By default, the buildserver command invokes the UNIX cobcc command. You can specify an alternative compile command and set your own flags for the compile and link-edit phases, however, by setting the ALTCC and ALTCFLAGS environment variables, respectively. For more information, refer to Setting Environment Variables.

Note: On a Windows NT system, the ALTCC and ALTCFLAGS environment variables are not applicable and setting them will produce unexpected results. You must compile your application first using a COBOL compiler and then pass the resulting object file to the buildserver command.

The following command processes the acct.o application file and creates a server called ACCT that contains two services: NEW_ACCT, which calls the OPEN_ACCT routine, and CLOSE_ACCT, which calls a routine of the same name.

buildserver -C -o ACCT -f acct.o -s NEW_ACCT:OPEN_ACCT -s CLOSE_ACCT

See Also