Due to the way Connect TPS on the remote BEA TUXEDO system translates and converts data, the CICS programmer does not need to do anything to prepare data that is destined for the remote BEA TUXEDO system.
The key to this high degree of transparency is the Connect TPS configuration. It is through this mechanism that environmental differences, such as naming conventions and data formats, are concealed from programmers and programs.
It is the responsibility of the BEA TUXEDO administrator to set up the configuration file, but close coordination with the BEA TUXEDO application developer and the CICS programmer is necessary.
Note: For configuring the BEA Connect TCP for CICS Requester, see Chapter 5, "Administering BEA Connect TCP for CICS".
Although all data is converted and translated automatically by the remote Connect TPS Gateway, the rules implemented are outlined below to assist the CICS programmer in understanding how the data is manipulated. It is important for the CICS programmer to remember that this chapter is written from the point of view of the BEA TUXEDO environment.
The following subsections describe the basic rules that Connect TPS follows when it translates data and provide detailed information about how Connect TPS handles string and numeric data.
When a client program on the remote BEA TUXEDO system sends data to (or receives data from) a service routine on a different model of computer, Connect TPS automatically translates data as required. Translation involves changing the representation of intrinsic data types by changing attributes such as word length and byte order.
Connect TPS automatically translates input and output data as required, following rules that are described in this chapter.
The following are some commonly used BEA TUXEDO terms for buffer types:
STRING
CARRAY
VIEW
FML
Table 4-1 lists the data translation rules that BEA Connect TPS follows:
Note: BEA TUXEDO provides a field type named dec_t that supports decimal values within VIEWs. BEA Connect TPS translates these fields into machine independent representations of packed decimals. For example, dec_t(m,n) becomes S9(2*m-(n+1))V9(n) COMP-3. Therefore, a decimal field with a size of 8,5 corresponds to S9(10)V9(5) COMP-3.
Table 4-2 summarizes the translation rules between C and IBM/310 data types.
This subsection provides suggestions that will help you develop VIEW definitions for input and output buffers and records. It also explains how string data and numeric data are treated in the Connect TPS environment.
When you create VIEW definitions for input and output records that are used by CICS applications, do not specify an extra position for the terminating NULL characters that are used in string fields.
For example, when a CICS application program expects 10 characters in an input record, specify 10 for that field, not 10 plus 1.
Note: Although Connect TPS does not require strings to be NULL-terminated, it respects NULL termination. Therefore, when BEA Connect TPS detects a NULL (zero) character within a string, it does not process any subsequent characters. To pass full 8-bit data that contains embedded NULL values, use a CARRAY type field or buffer.
The character set translations performed by Connect TPS for BEA TUXEDO are fully localizable, in accordance with the X/Open XPG Portability Guides. ASCII and EBCDIC translations are loadable from message files. BEA Connect TPS contains default behaviors which should meet the requirements of most English-language applications. However, you may find it necessary to customize tables. See the BEA Connect TPS User Guide for complete instructions.
You can convert numeric data into different data types easily, provided that you have enough range in the intermediate and destination types to handle the maximum value you need to represent.
For example, you can convert an FML field of double into a packed decimal field on the remote target system by specifying an appropriate dec_t type VIEW element.
In addition, you can convert numeric values into strings (and the reverse). For example, while FML buffers do not directly support the dec_t type, you can place decimal values in string fields and map these to dec_t fields within VIEW definitions.