3. Embedded QUEL for COBOL : COBOL Variables and Data Types : Data Type Conversion : Ingres Types and Corresponding COBOL Data Types
 
Share this page                  
Ingres Types and Corresponding COBOL Data Types
The following table list Ingres types with their corresponding COBOL data types.
Ingres Type
UNIX COBOL Type
VMS COBOL Type
cN
PIC X(N)
PIC X(N)
text(N)
PIC X(N)
PIC X(N)
char(N)
PIC X(N).
PIC X(N).
varchar(N)
PIC X(N).
PIC X(N).
i1
PIC S9(2) USAGE COMP.
PIC S9(2) USAGE COMP.
i2
PIC S9(4) USAGE COMP.
PIC S9(4) USAGE COMP.
i4
PIC S9(9) USAGE COMP.
PIC S9(9) USAGE COMP.
f4
PIC S9(10)V9(8) USAGE COMP-3.
USAGE COMP-1.
f8
PIC S9(10)V9(8) USAGE COMP-3.
USAGE COMP-2
date
PIC X(25).
PIC X(25).
money
PIC S9(10)V9(8) USAGE COMP-3.
USAGE COMP-2.
decimal
PIC S9(P-S)V(S) USAGE COMP-3.
PICS9(P-S)V(S)
USAGE COMP-3.
Note that Ingres stores decimal as signed. Thus, use a signed decimal variable if it interacts with a Ingres decimal type. Also, Ingres allows a maximum precision of 39 while COBOL allows only 18.