beautypg.com

HP NonStop G-Series User Manual

Page 89

background image

Data Conversion Library

Data Conversion

110838 Tandem Computers Incorporated

6–3

Table 6-1. Automatic Data Conversion (Page 2 of 2)

DICTOBL
“Structure”

Number

Tandem Data Type

Description

Tandem DDE Gateway Conversion Notes

19

Logical*2

Two's complement binary conversion.

21

Logical*4

Two's complement binary conversion.

22

Binary 8 signed

Two's complement binary conversion.

23

Binary 8 unsigned

Two's complement binary conversion.
Negative sign removed on DDE Poke functions.

24

SQL Varchar

Treated as for the alphanumeric string data type.
On DDE Poke functions, the length part of the data element is
set to the number of characters converted.

25

Enumeration

Two's complement binary conversion.
Negative sign removed on DDE Poke functions.

26

Bit signed

Two's complement binary conversion.

27

Bit unsigned

Two's complement binary conversion.
Negative sign removed on DDE Poke functions.

28

National string

Not supported.

32 to 77

SQL datetime and
interval data types

Treated as for the alphanumeric string data type.

Data Conversion

Library

If you use the binary-pass-through approach in communicating with the Tandem DDE
Gateway, then define the message layouts in your client application and convert the
data between Tandem and workstation data representations by calling conversion
functions from your client application.

You can obtain data conversion functions from a number of sources.

Use the data conversion library provided with the Tandem DDE Gateway. This
library provides conversion functions between strings in CF_TEXT clipboard
format (basically strings of characters terminated with a byte of binary zeros) and
various Tandem data representations commonly used in Tandem servers.

Use the data conversion functions provided with RSC. These functions do
conversions between workstation and Tandem integer data types.

Take advantage of any special data representations provided by the workstation
application development tool you are using. For example, strings in Microsoft
Visual Basic can be declared as having automatically added trailing spaces, which
is very useful if your client application sends messages to COBOL Tandem
servers.

Use the data conversion functions coded into the Tandem DDE Gateway example
applications that use binary-pass-through. See the EXAMPLES\ subdirectory.

Write your own data conversion functions that are customized for your
application and client application development tool.