BEA Logo BEA WebLogic Enterprise Release 5.1

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

 

   WebLogic Enterprise Doc Home   |   Tuxedo ATMI Topics   |   Previous Topic   |   Next Topic   |   Contents   |   Index

compilation(5)

Name

compilation-how to compile BEA Tuxedo system application components

Description

In order to compile application clients and servers, and subroutines that are link edited with the BEA Tuxedo system-supplied client, mio, programmers need to know:

This reference page provides this information.

BEA Tuxedo System, In General

Header File Sequence

UNIX header files should always be included before any BEA Tuxedo system header files. Commonly used UNIX header files are stdio.h and ctype.h.

Environment Variables

In general, the following environment variables should be set and exported:

TERM

Indicates terminal type, if a terminal is used.

TUXDIR

Specifies the topmost directory where the BEA Tuxedo system software resides.

PATH

Should include $TUXDIR/bin.

ULOGPFX

Prefix of the filename of the central event log; default, ULOG.

More information about these variables can be found in the Transaction Monitor Programmer's Guide and the Transaction Monitor Administrator's Guide.

BEA Tuxedo System

Header File Sequence

Form files do not contain header information.

C programs that call mio functions should include the following header files, in the order listed below:

#include <UNIX header files> (if needed by the application) 
#include "fml.h"
#include "Usysflds.h"

C programs that call BEA Tuxedo system functions that access the Bulletin Board should include the following header files, in the order listed below:

#include <UNIX header files> (if needed by the application) 
#include "atmi.h"

Additionally, programs that call amaskout should include the following:

#include <signal.h> 
#include "Usignal.h"

Note: If a program uses amaskout and other BEA Tuxedo system functions, UNIX header file(s) should be included before including BEA Tuxedo system header files.

Usignal.h, atmi.h, fml.h, and Usysflds.h may be specified in any order, as long as fml.h is specified before Usysflds.h. For example, the following are both valid:

Sample 1

Sample 2

#include <stdio.h>

#include "atmi.h"

#include "fml.h"

#include "Usysflds.h"

#include "fml.h"

#include "Usysflds.h"

#include <stdio.h>

#include signal.h>

#include "Usignal.h"

#include "atmi.h"

Applications using the functions on the tpservice(3), tpalloc(3), tpbegin(3), tpcall(3), tpinit(3), and tpopen(3) reference pages should include the atmi.h header file.

Compilation of UFORM Masks

UFORM masks are compiled as follows:

Create field tables and field table header files.
Set and export FIELDTBLS
and FLDTBLDIR.

Execute the command:

mc filename.m

where

To build an mio program, do the following:

  1. Create the forms using UFORM or vuform(1).

  2. Write and archive lastval and firstval functions (if desired).

  3. Write and archive default and validation functions.

  4. Build the mio program by executing:

    buildmio [-w] [-o outfile] [-v vallib] [-d dfltlib] [-f lib] [-a genlib]

where

To build a non-mio client program, execute:

buildclient [ -v ] [ -w ] [ -o name] [ -f firstfiles] [ -l lastfiles] [ -r rmname] 

where

To compile a BEA Tuxedo system server, execute:

buildserver [ -o pgm] [ -s services] [ -f objectfiles] [ -r rmname]

where

Environment Variables

The following environment variables should be set and exported before executing mc(1) or vuform(1):

FIELDTBLS

Comma-separated list of field table files.

FLDTBLDIR

Colon-separated list of directories to search for the FIELDTBLS.

The following environment variables can be set and exported before executing mio.

MASKPATH

Full path of the directory containing the compiled masks, default is the current directory.

MASKIPCKEY

Key to mask cache; must be specified if cache is used.

If a default or validation routine references FML fields, set:

FIELDTBLS

Comma-separated list of field table files.

FLDTBLDIR

Colon-separated list of directories to search for the FIELDTBLS.

To restrict access to forms, set:

OKXACTS

Comma-separated list of forms that the user can access, default is all.

NGXACTS

Comma-separated list of forms that the user cannot access, default is none.

Note: OKXACTS is checked first. If the form is listed in OKXACTS (or OKXACTS is ALL), then NGXACTS is checked. If the form is listed in NGXACTS, then an error is reported. More information about running mio can be found in the Transaction Monitor Programmer's Guide, the Transaction Monitor Administrator's Guide and the Data Entry System Guide.

When the system has been built with shared libraries, the following environment variable must be set as shown before executing a client:

LD_LIBRARY_PATH=$TUXDIR/lib

The following environment variable should be set before executing a server:

TUXCONFIG

Full pathname of the binary configuration file, default is the current directory.

The following environment variable should be set and exported before executing system supplied clients (bkenq(1), mio, tmadmin(1), ud(1)) in an application with security turned on:

APP_PW

Application password.

The following environment variables should be set and exported before executing Workstation clients:

WSENVFILE

File containing environment variable settings.

WSDEVICE

Network device to use for connection.

WSTYPE

Workstation machine type.

More information about options for servers can be found on the servopts(5) reference page.

FML Programs

Header File Sequence

C programs that call FML functions should include the following header files, in the order listed below:

#include <UNIX header files> (if needed by the application)
#include "fml.h"

Note: mio programs that use FML must also include fml.h.

Compilation of FML Programs

To compile a program that contains FML functions, execute:

cc pgm.c -I $TUXDIR/include -L $TUXDIR/lib -lfml -lgp -o pgm

where pgm is the name of the executable file.

If the -L option is not locally supported, use the following command instead:

cc pgm.c -I $TUXDIR/include $TUXDIR/lib/libfml.a $TUXDIR/lib/libgp.a -o pgm 

Note: The order in which libraries are specified is significant. Use the order given above.

Compiling FML VIEWS

To use the FML view compiler, execute:

viewc view_file

where

view_file is one or more files containing source view descriptions.

Note: viewc invokes the C compiler. The environment variable CC can be used to designate the compiler to use. The environment variable CFLAGS can be used to pass a set of parameters to the compiler.

Environment Variables for FML

The following environment variables should be set and exported when running an application that uses FML:

FIELDTBLS

Comma-separated list of field table files.

FLDTBLDIR

Colon-separated list of directories to search for the FIELDTBLS.

The following environment variables should be set and exported when executing viewc:

FIELDTBLS

Comma-separated list of field table files.

FLDTBLDIR

Colon-separated list of directories to search for the FIELDTBLS.

VIEWDIR

Directory containing view files, default is current directory.

Portability

The buildclient(1) alias buildclt(1) must be used on MS-DOS and OS/2 machines because of file naming restrictions. Differences in file naming semantics and syntax also affect the following environment variables:

See Also

buildclient(1), buildserver(1), buildmio(1), mc(1), viewc(1), cc(1) in a UNIX reference manual