BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Programming   |   Topic List   |   Previous   |   Next   |   Contents

   Programming a BEA Tuxedo Application Using COBOL

Overview of Typed Records

In order to send data to another application program, the sending program first places the data in a record. BEA Tuxedo System clients use typed records to send messages to servers. The term "typed record" refers to a pair of COBOL records: a data record and an auxiliary type record. The data record is defined in static storage and contains application data to be passed to another application program. An auxiliary type record accompanies the data record. It specifies the interpretation and translation rules of the data record to be used by the BEA Tuxedo system when passing the information between heterogeneous systems. Typed records make up one of the fundamental features of the distributed programming environment supported by the BEA Tuxedo system.

Why typed? In a distributed environment, an application may be installed on heterogeneous systems that communicate across multiple networks using different protocols. Different types of records require different routines to initialize, send and receive messages, and encode and decode data. Each record is designated as a specific type so that the appropriate routines can be called automatically without programmer intervention.

The following table lists the typed records supported by the BEA Tuxedo system and indicates whether or not:

If any routing routines are required, the application programmer must provide them as part of the application.

Typed Records

Typed Record

Description

Self-
Describing

Subtype

Data-
Dependent Routing

Encoding/
Decoding

CARRAY

Undefined array of characters, any of which can be LOW-VALUE. This typed record is used to handle the data opaquely, as the BEA Tuxedo system does not interpret the semantics of the array. Because a CARRAY is not self-describing, the length must always be provided during transmission. Encoding and decoding are not supported for messages sent between machines because the bytes are not interpreted by the system.

No

No

No

No

FML (Field Manipulation Language)

Proprietary BEA Tuxedo System type of self-describing record in which each data field carries its own identifier, an occurrence number, and possibly a length indicator. T record offers data-independence and greater flexibility

The FML record uses 16 bits for field identifiers and lengths of fields.

Refer to Using an FML Typed Record for more information.

Yes

No

Yes

Yes

FML32

Equivalent to FML but uses 32 bits for field identifiers and lengths of fields, which allows for larger and more fields and, consequently, larger overall records.

However, the FML routines that are available for manipulating the FML typed record in the C programming language are not available in COBOL.The primary use of FML32 in COBOL is simply to work with C programs in which VIEW32 or FML32 typed records are used.

Refer to Using an FML Typed Record for more information.

Yes

No

Yes

Yes

STRING

Array of characters that terminates with a LOW-VALUE character. The BEA Tuxedo System can convert data automatically when data is exchanged by machines with different character sets.

No

No

No

No

VIEW

COBOL data structure defined by the application. VIEW types must have subtypes that designate individual data structures. A view description file, in which the fields and types that appear in the data structure are defined, must be available to client and server processes that use a data structure described in a VIEW typed record. Encoding and decoding are performed automatically if the record is passed between machines of different types. Refer to Using a VIEW Typed Record for more information.

No

Yes

Yes

Yes

VIEW32

Equivalent to VIEW but uses 32 bits for length and count fields, which allows for larger and more fields and, consequently, larger overall records.

The primary use of VIEW32 in COBOL is simply to work with C programs in which VIEW32 or FML32 typed records are used.

Refer to Using a VIEW Typed Record for more information.

No

Yes

Yes

Yes

X_COMMON

Equivalent to VIEW, but used for compatibility between COBOL and C programs. Field types should be limited to short, long, and string.

No

Yes

Yes

Yes

XML

An XML document that consists of:

The routing of an XML document can be based on element content, or on element type and an attribute value. The XML parser determines the character encoding being used; if the encoding differs from the native character sets (US-ASCII or EBCDIC) used in the BEA Tuxedo configuration files (UBBCONFIG(5) and DMCONFIG(5)), the element and attribute names are converted to US-ASCII or EBCDIC. Refer to Using an XML Typed Recordfor more information.

No

No

Yes

No

X_OCTET

Equivalent to CARRAY.

No

No

No

No

All record types are defined in a file called tmtypesw.c in the $TUXDIR/lib directory. Only record types defined in tmtypesw.c are known to your client and server programs. You can edit the tmtypesw.c file to add or remove record types. In addition, you can use the BUFTYPE parameter (in UBBCONFIG) to restrict the types and subtypes that can be processed by a given service.

The tmtypesw.c file is used to build a shared object or dynamic link library. This object is dynamically loaded by both BEA Tuxedo administrative servers, and application clients and servers.

See Also