![]() |
![]() |
e-docs > Tuxedo > Programming a Tuxedo Application Using COBOL > Programming Environment |
Programming a Tuxedo Application Using COBOL
|
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:
The following table summarizes the UBBCONFIG configuration file parameters that affect the programming environment. Parameters are listed by functional category.
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
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 a BEA Tuxedo Application for more information.)
For the client and server routines in your application, you can update existing environment variables or create new ones. The following table summarizes the most commonly used environment variables. The variables are listed by functional category.
Table 2-2 Programming-related Environment Variables
If operating in a UNIX environment, add $TUXDIR/bin to your environment PATH to ensure that your application can locate the executables for the BEA Tuxedo system commands. For more information on setting up the environment, refer to Setting Up a BEA Tuxedo Application. See Also
Defining Equivalent Data Types
The following table lists the C data types for which equivalent COBOL data types are available.
Table 2-3 COBOL Equivalents for C Data Types
C Data Type |
Equivalent COBOL Data Type |
---|---|
float |
COMP-1 |
double |
COMP-2 |
long |
S9(9) COMP-51 |
short |
S9(4) COMP-51 |
dec_t |
COBOL COMP-3 packed decimal field |
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: 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.dec_t(m, n) => S9(2*m-(n+1),n)COMP-3
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
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |