Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Typed buffers

&pagelevel(3)&pagelevel

XATMI applications exchange messages using “typed data buffers”. This ensures that the data sent over the network is transferred correctly to the application, i.e. in accordance with the data structure - and associated data types - which is identified by the buffer name.

The advantage of this is that the application need not take account of any machine dependencies, such as Big Endian/Little Endian representation, ASCII/EBCDIC conversion, or alignment with word limits. This means that data types such as int, long, float, etc. can be transferred as such. There is no need for any encoding/decoding by the application because this is carried out by XATMI (in accordance with the rules of the XATMI U-ASE definition).

A data buffer object comprises four components:

  • type: defines the class of buffer; there are three types

  • subtype: defines the object of the type, i.e. the actual data structure

  • length specification

  • data contents

This type of data buffer is created at runtime and can then be addressed by its variable name (= subtype name). The subtype defines the structure, while the type defines the set of values of the permitted elementary data types. In C programs, these buffers are created dynamically with tpalloc() and are then called “typed buffers”; in COBOL programs, these buffers are defined statically and are then called “typed records”.

Types

The data buffer type defines which elementary data types of the employed programming language are permitted. This enables a shared data understanding in a heterogeneous client/server network.

Three types are defined in XATMI:

X_OCTET

Non-typed data stream of bytes (“user buffer”). This type has no subtypes.

No conversion takes place.

X_COMMON

All data types that can be used in common by C and COBOL.
Conversion is carried out by XATMI.

X_C_TYPE

All elementary C data types, with the exception of pointers.
Conversion is carried out by XATMI.

Subtypes

A subtype has a name of up to 16 characters, with which it is addressed in the application program. Each subtype is assigned a data structure (C structure or COBOL record) which determines the syntax of the subtype, see "Creating typed buffers".
The data types must not be nested.

The structure of a subtype is represented by a syntax string in the local configuration. In this string each elementary data type (basic type) is identified by a code which, if necessary, may also contain the field length specification (<m> and <n>).
The table below provides an overview of the elementary data types (basic types), their codes, and the character set of the string types:

Code 1

Meaning

ASN.1 type

X_C_TYPE

X_COMMON

s

short integer

INTEGER

short

S9(4) COMP-5

S<n>

short integer array

SEQUENCE OF INTEGER

short[n]

S9(4) COMP-5 ...

i

integer

INTEGER

integer

--2

I<n>

integer array

SEQUENCE OF INTEGER

integer[n]

--

l

long integer

INTEGER

long

S9(9) COMP-5

L<n>

long integer array

SEQUENCE OF INTEGER

long[n]

S9(9) COMP-5 ...

f

float

REAL

float

--

F<n>

float array

SEQUENCE OF REAL

float[n]

--

d

double

REAL

double

--

D<n>

double array

SEQUENCE OF REAL

double[n]

--

c

character

OCTET STRING

char

PIC X

t

character

T.61-String

char

PIC X

C<n>

character array: All values from 0 thru 255 (decimal)

OCTET STRING

char[n]

PIC X(n)

C!<n>

character array, terminated by null ('\0')

OCTET STRING

char[n]

--

C<m>:<n>

character matrix3

SEQUENCE OF OCTET STRING

char [m][n]

--

C!<m>:<n>

character matrix, terminated by null ('\0')

SEQUENCE OF OCTET STRING

char [m][n]

--

T<n>

The printable characters A-Z, a-z, and 0-9 plus4 a  range of special characters and control characters, see "Character sets".

T.61 string

char[n]

PIC X(n)

T!<n>

character array, terminated by null ('\0')

T.61-String

t61str[n]

--

T<m>:<n>

character matrix

SEQUENCE OF T.61-String

t61str[m][n]

--

T!<m>:<n>

character matrix, terminated by null ('\0')

SEQUENCE OF T.61-String

t61str[m][n]

--

1used in the local configuration to describe the data structures

2-- : not available in X_COMMON

3character matrix: two-dimensional character array

4in accordance with CCITT Recommendation T.61 or ISO 6937

The assignment between data structures, subtypes, and desired services is defined in the local configuration, see "Creating the local configuration file".

Character set conversion with X_C_TYPE and X_COMMON

The data buffers are transmitted over the network encoded in the ASCII character set.

However, a partner can use a different character set encoding instead of ASCII, for example a BS2000 application which uses EBCDIC. In this case, the XATMI library converts the ASN.1-type T.61 string for all incoming and outgoing data (with the exception that OCTET strings are not converted).

Therefore no automatic conversion may be generated. For the UPIC carrier system this means the respective identifier must be generated in the upicfile:

  • This is SD or ND for Unix, Linux and Windows systems (stand-alone application).

  • This is HD for BS2000 systems (stand-alone application).

  • This is CD for the node applications of a UTM cluster application.