Table of Contents Previous Next PDF


Programming Environment

Programming Environment
This topic includes the following sections:
Updating the UBBCONFIG Configuration File
The application administrator initially defines the configuration settings for an application in the UBBCONFIG configuration file. To customize your programming environment, you may need to create or update a configuration file.
If you need to create or update a configuration file, refer to the following guidelines:
Copy and edit a file that already exists. For example, the file ubbshm that comes with the bankapp sample application can provide a good starting point.
Make sure the IPCKEY parameter in the configuration file does not conflict with any other parameters being used at your installation. Check with your Oracle Tuxedo application administrator, and refer to Setting Up an Oracle Tuxedo Application for more information.
Set the UID and GID parameters so that you are the owner of the configuration.
Review the documentation. The configuration file is described in UBBCONFIG(5) in the File Formats, Data Descriptions, MIBs, and System Processes Reference.
Table 2‑1 summarizes the UBBCONFIG configuration file parameters that affect the programming environment. Parameters are listed by functional category.
 
Specifies the minimum and maximum number of occurrences of the server to be started by tmboot(1). If not specified, MIN defaults to 1 and MAX defaults to MIN. The same parameters are available for use with request/response servers. However, conversational servers are automatically spawned as needed. So if you set MIN=1 and MAX=10, for example, tmboot starts one server initially. When a TPCONNECT call is made to a service offered by that server, the system starts a second copy of a server. As each copy is called, a new one is spawned, up to a limit of 10.
Controls whether a service routine is placed in transaction mode. If you set this parameter to Y, a transaction in the service subroutine is automatically started whenever a request message is received from another process.
The configuration file is an operating system text file. To make it usable by the system, you must execute the tmloadcf(1) command to convert the file to a binary file.
See Also
UBBCONFIG(5) in the File Formats, Data Descriptions, MIBs, and System Processes Reference
Setting Environment Variables
Initially, the application administrator sets the variables that define the environment in which your application runs. These environment variables are set by assigning values to the ENVFILE parameter in the MACHINES section of the UBBCONFIG file. (Refer to Setting Up an Oracle Tuxedo Application for more information.)
For the client and server routines in your application, you can update existing environment variables or create new ones. Table 2‑2 summarizes the most commonly used environment variables. The variables are listed by functional category.
 
ALTCC1
Specify cobcc85 to use the Fujitsu NetCOBOL compiler.
buildclient() -C and buildserver() -C commands.
buildclient() -C and buildserver() -C commands.
COBOPT cannot be used with Fujitsu NetCOBOL compiler. Please refer to Fujitsu’s NetCOBOL manuals for COBOL environment variables.
buildclient() -C and buildserver() -C commands.
Directories that contain a set of the COBOL COPY files to be used by the compiler.
COBCPY cannot be used with Fujitsu NetCOBOL compiler. Please refer to Fujitsu’s NetCOBOL manuals for COBOL environment variables.
buildclient() -C and buildserver() -C commands.
FIELDTBLS or FIELDTBLS32
Comma-separated list of field table filenames for FML and FML32 typed records, respectively. Required only for FML VIEW types.
FML and FML32 record types and FML VIEWs.
FLDTBLDIR or FLDTBLDIR32
Colon-separated list of directories to be searched for the field table files for FML and FML32, respectively. For Windows 2003, a semicolon-separated list is used.
FML and FML32 record types and FML VIEWs.
VIEWFILES or VIEWFILES32
Comma-separated list of allowable filenames for VIEW and VIEW32 typed records, respectively.
VIEW and VIEW32 record types.
VIEWDIR or VIEWDIR32
Colon-separated list of directories to be searched for VIEW and VIEW32 files, respectively. For Windows 2003, a semicolon-separated list is used.
VIEW and VIEW32 record types.

1
On a Windows 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 buildclient or buildserver command.

If operating in a UNIX environment, add $TUXDIR/bin to your environment PATH to ensure that your application can locate the executables for the Oracle Tuxedo system commands. For more information on setting up the environment, refer to Setting Up an Oracle Tuxedo Application.
See Also
Defining Equivalent Data Types
Table 2‑3 lists the C data types for which equivalent COBOL data types are available.
 
S9(9) COMP-51

1
COMP-5, provided for use with MicroFocus COBOL, allows the COBOL integer fields to match the data format of the corresponding C fields. The data type for VS COBOL II is COMP.

For storage efficiency, COBOL supports packed decimals: two decimal digits packed into each byte with the low-order half byte used to store the sign. The length of a packed decimal may be 1 to 9 bytes with storage available for 1 to 17 digits, including the sign.
The dec_t field is defined in a VIEW. The size is specified as two values separated by a comma. The first value indicates the total number of bytes occupied by the decimal in COBOL. The second value indicates the number of digits to the right of the decimal point in COBOL. You can use the following formula to convert the dec_t field to a COBOL declaration:
dec_t(m, n) => S9(2*m-(n+1),n)COMP-3
For example, a size specification of 6,4 in the VIEW indicates that there are 4 digits to the right of the decimal point and 7 digits to the left, and the last half byte is used to store the sign. A COBOL application programmer represents this as 9(7)V9(4), where the V represents the decimal point between each value. Note that FML does not support the dec_t type; if FML-dependent VIEWs are used, then each field must be mapped to a C type in the VIEW file. For instance, a packed decimal can be mapped to an FML string field, and then the mapping functions can be used to do the conversion between formats.
Starting and Stopping the Application
To start the application, execute the tmboot(1) command. The command gets the IPC resources required by the application, and starts administrative processes and application servers.
To stop the application, execute the tmshutdown(1) command. The command stops the servers and releases the IPC resources used by the application, except any that might be used by the resource manager, such as a database.
See Also
tmboot(1) and tmshutdown(1) in the Oracle Tuxedo Command Reference

Copyright © 1994, 2017, Oracle and/or its affiliates. All rights reserved.