BEA Logo BEA Tuxedo Release 8.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   Tuxedo Documentation   |   Tutorials for Developing BEA Tuxedo ATMI Applications   |   Local Topics   |   Previous Topic   |   Next Topic   |   Contents

 


Step 1: How to Set the Environment Variables

The environment variables are defined in the bankvar file. The file is large (approximately 185 lines) because it includes extensive comments.

  1. In a text editor, familiarize yourself with the bankvar file.

  2. Set TUXDIR to the root directory of your BEA Tuxedo system directory structure, and export it.

  3. Another line in bankvar sets APPDIR to the directory ${TUXDIR}/samples/atmi/bankapp, which is the directory where bankapp source files are located. APPDIR is a directory where the BEA Tuxedo system looks for your application-specific files. You may prefer to copy the bankapp files to a different directory to safeguard the original source files. If you do, enter the directory there. It does not have to be under TUXDIR.

  4. Set a value for DIPCKEY. This is an IPCKEY for a BEA Tuxedo system database. The value of DIPCKEY must be different from the value of the BEA Tuxedo system IPCKEY specified in the UBBCONFIG file.

    Note: Other variables specified in bankvar play various roles in the sample application; you need to be aware of them when you are developing your own application. By including them all in bankvar, we provide you with a "template" that you may want to adapt at a later time for use with a real application.

  5. When you have made all the required changes to bankvar, execute bankvar as follows:
    . ./bankvar

    bankvar: Environment Variables for bankapp

    # Copyright (c) 1997, 1996 BEA Systems, Inc.
    # Copyright (c) 1995, 1994 Novell, Inc.
    # Copyright (c) 1993, 1992, 1991, 1990 Unix System Laboratories, Inc.
    # All rights reserved
    #
    # This file sets all the environment variables needed by the TUXEDO software
    # to run the bankapp
    #
    # This directory contains all the TUXEDO software
    # System administrator must set this variable
    #
    if [ -z "${TUXDIR}" ] ; then
    if [ ! -z "${ROOTDIR}" ] ; then
    TUXDIR=$ROOTDIR
    export TUXDIR
    fi
    fi
    TUXDIR=${TUXDIR:?}
    #
    # Reset LANG if necessary
    #
    if [ ! -d ${TUXDIR}/locale/C -a -d ${TUXDIR}/locale/english_us ] ; then
    export LANG
    LANG=english_us.ascii
    fi
    #
    # This directory contains all the user written code
    #
    # Contains the full path name of the directory that the application
    # generator should place the files it creates
    #
    APPDIR=${TUXDIR}/apps/bankapp
    #
    # This path contains the shared objects that are dynamically linked at
    # runtime in certain environments, e.g., SVR4.
    #
    LD_LIBRARY_PATH=${TUXDIR}/lib:${LD_LIBRARY_PATH}
    #
    # Set the path to shared objects in HP-UX
    #
    SHLIB_PATH=${TUXDIR}/lib:${SHLIB_PATH}
    #
    # Set the path to shared objects in AIX
    #
    LIBPATH=${TUXDIR}/lib:/usr/lib:${LIBPATH}
    #
    # Logical block size; Database Administrator must set this variable
    #
    BLKSIZE=512
    #
    # Set default name of the database to be used by database utilities
    # and database creation scripts
    #
    DBNAME=bankdb
    #
    # Indicate whether database is to be opened in share or private mode
    #
    DBPRIVATE=no
    #
    # Set Ipc Key for the database; this MUST differ from the UBBCONFIG
    # *RESOURCES IPCKEY parameter
    #
    DIPCKEY=80953
    #
    # Environment file to be used by tmloadcf
    #
    ENVFILE=${APPDIR}/ENVFILE
    #
    # List of field table files to be used by mc, viewc, tmloadcf, etc.
    #
    FIELDTBLS=Usysflds,bankflds,creditflds,eventflds
    #
    FIELDTBLS32=Usysfl32,evt_mib,tpadm
    #
    # List of directories to search to find field table files
    #
    FLDTBLDIR=${TUXDIR}/udataobj:${APPDIR}
    #
    FLDTBLDIR32=${TUXDIR}/udataobj:${APPDIR}
    #
    # Universal Device List for database
    #
    FSCONFIG=${APPDIR}/bankdl1
    #
    # Network address, used in MENU script
    #
    NADDR=
    #
    # Network device name
    #
    NDEVICE=
    #
    # Network listener address, used in MENU script
    #
    NLSADDR=
    #
    # Make sure TERM is set
    #
    TERM=${TERM:?}
    #
    # Set device for the transaction log; this should match the TLOGDEVICE
    # parameter under this site's LMID in the *MACHINES section of the
    # UBBCONFIG file
    #
    TLOGDEVICE=${APPDIR}/TLOG
    #
    # Device for binary file that gives the BEA Tuxedo system all its information
    #
    TUXCONFIG=${APPDIR}/tuxconfig
    #
    # Set the prefix of the file which is to contain the central user log;
    # this should match the ULOGPFX parameter under this site's LMID in the
    # *MACHINES section of the UBBCONFIG file
    #
    ULOGPFX=${APPDIR}/ULOG
    #
    # System name, used by RUNME.sh
    #
    UNAME=
    #
    # List of view files to be used by viewc, tmloadcf, etc.
    #
    VIEWFILES=aud.V
    #
    VIEWFILES32=mib_views,tmib_views
    #
    # List of directories to search to find view files
    #
    VIEWDIR=${TUXDIR}/udataobj:${APPDIR}
    #
    VIEWDIR32=${TUXDIR}/udataobj:${APPDIR}
    #
    # Specify the Q device (if events included in demo)
    #
    QMCONFIG=${APPDIR}/qdevice
    #
    # Export all variables just set
    #
    export TUXDIR APPDIR BLKSIZE DBNAME DBPRIVATE DIPCKEY ENVFILE
    export LD_LIBRARY_PATH SHLIB_PATH LIBPATH
    export FIELDTBLS FLDTBLDIR FSCONFIG MASKPATH OKXACTS TERM
    export FIELDTBLS32 FLDTBLDIR32
    export TLOGDEVICE TUXCONFIG ULOGPFX
    export VIEWDIR VIEWFILES
    export VIEWDIR32 VIEWFILES32
    export QMCONFIG
    #
    # Add TUXDIR/bin to PATH if not already

Note: If your operating system is Sun Solaris, you must do two things: use /bin/sh rather than csh for your shell place; and specify /usr/5bin at the beginning of your PATH, as follows.

PATH=/usr/5bin:$PATH;export PATH

See Also

 

back to top previous page next page