TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)

68 Chapter3
Defining a Database
Item Part
Data Items of Type P
The bits used to represent the sign of a packed decimal value can vary depending on
whether the value is entered using QUERY/3000, a COBOL II program, or an RPG
program. Here is a summary of what happens in each case:
For values entered using QUERY/3000:
NO sign specified: Sign is 1111
2
PLUS sign specified: Sign is 1100
2
MINUS sign specified: Sign is 1101
2
For values entered using COBOL II:
PICTURE clause specifies NO sign: Sign is 1111
2
PICTURE clause specifies PLUS sign: Sign is 1100
2
R2
d
Short
real
Real Real
R4
d
Real Double
precision
Longreal
a
U String char Display Picture A Character Char
[subrange]
Character
X String char Display Picture X Character Char Character
Xn char[n] Display Picture
X(n)
Packed array
[1..n] of char
Z Display Picture
S9
Character
Zn Display Picture
S9(n)
Packed array
[1..n] of char
c
a. The Pascal long real is an extension for double-word floating point.
b. For data type Kn, n is a length qualifier ranging from 2 to 255, inclusive. Note that,
although the Schema Processor, DBSCHEMA, allows you to define a Kn data type, not all
languages support it. Be sure to select an appropriate data type based on your
programming language and report writer requirements.
c. These Pascal declarations provide correct storage allocation.
d. The Schema Processor, DBSCHEMA, allows you to define an E or R data type ranging in
length from 1 to 255, inclusive. However, not all languages support these data types. Be
sure to select an appropriate data type based on your programming language and report
writer requirements. Compiler options are usually required to choose between HP 3000
floating point and IEEE reals. Be sure your program is compiled correctly and check your
data values with QUERY/3000.
Table 3-3. TurboIMAGE/XL Data Types and Programming Languages
Data\
Type
BBASIC C COBOL II FORTRAN
77
Pascal RPG