[Top] [Previous] [Next] [End of Book]

# Chapter 4 . Configuring BEA Connect TCP for CICS

## Introduction

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".

## How Connect TPS Translates Data

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.

### Introduction

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.

### BEA TUXEDO Terminology

The following are some commonly used BEA TUXEDO terms for buffer types:

`STRING`
  A buffer of character data that is terminated by the first null character in the buffer. Typically, character string buffers undergo translation when sent to a system that is different from the sending system.

`CARRAY`
  A CARRAY is a buffer of raw data that contains no terminating character and that undergoes no conversion or translation; the data is sent from one system to another without modification.A CARRAY is an exemplary buffer type for a graphics file.

`VIEW`
  A VIEW buffer is a collection of field definitions that can be treated as a single entity. It is comparable to a record layout in COBOL or a structure in C.

`FML`
  FML (Fielded Manipulation Language) buffers are variable length, dynamic, self-describing buffers. Each field in the buffer has its own descriptive header. In BEA TUXEDO, FML buffers can be tied closely to VIEW buffers so that conversion from one

### Data Translation Rules

Table 4-1 lists the data translation rules that BEA Connect TPS follows:

> Table 4-1 BEA Connect Data Translation Rules

Field Type | Translation Rules
--- | ---
CARRAY | Passed untranslated as sequences of bytes
STRING and CHAR | Translated from ASCII to EBCDIC (if needed).
SHORT | Translated to S9(4) COMP
LONG | Translated to S9(9) COMP
FLOAT | Translated to COMP-1
DOUBLE | Translated to COMP-2

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.

> Table 4-2 Data Translation Rules between C and IBM/310 Data Types

Remote Data Type | Description | View Field Type/Length
PIC X(n) | Alpha-numeric Characters | string / n
PIC X | Single Alpha-numeric Character | char
PIC X(n) | Raw Bytes | carray / n
PIC X | Single Numeric Byte | carray / 1
PIC S9(4) COMP | 32-bit Integer | short
PIC S9(9) COMP | 64-bit Integer | long
COMP-1 | Single-precision Floating Point | float
COMP-2 | Double-precision Floating Point | double
PIC S9((m+(n+1))/2)V9(n) COMP-3 | Packed Decimal | dec_t / m,n

### Strings and Numeric Data: A Closer Look

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.

#### Including NULL Characters in String Length Calculations

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.

#### Converting Numeric Data

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.

[Top] [Previous] [Next] [End of Book]