Figure 125. DB2 Server for VSE & VM Data Types for FORTRAN
Description |
DB2 Server for VSE & VM Keyword |
Equivalent FORTRAN Declaration |
---|---|---|
A binary integer of 31 bits, plus sign. | INTEGER or INT |
INTEGER
|
A binary integer of 15 bits, plus sign. | SMALLINT | INTEGER*2 |
A packed decimal number, precision p, scale s (1 <= p <= 31 and 0 <= s <=p). In storage the number occupies a maximum of 16 bytes. Precision is the total number of digits. Scale is the number of those digits that are to the right of the decimal point. |
DECIMAL[(p[,s])]
| Not supported. |
A single-precision (4- byte) floating-point number, in short System/390 floating-point format. |
REAL or
|
REAL
|
A double-precision (8- byte) floating-point number, in long System/390 floating-point format. |
FLOAT or
|
REAL*8
|
A fixed-length character string of length n where 0 < n <= 254. |
CHARACTER[(n)]
|
CHARACTER
|
A varying-length character string of maximum length n. If n > 254 but <= 32767, this data type is considered a long field. (See Using Long Strings for more information.) | VARCHAR(n) | Not supported. |
A varying-length character string of maximum length 32765 bytes (two bytes less than the DB2 Server for VSE & VM maximum, because of the length field). (Character strings >= 255 are not supported in FORTRAN releases prior to Release 1.3.) | LONG VARCHAR | Not supported. |
A fixed-length string of n DBCS characters where 0 < n <= 127. | GRAPHIC[(n)] | Not supported. |
A varying-length string of n DBCS characters. If n > 127 but <= 16383, this data type is considered a long field. (See Using Long Strings for more information.) | VARGRAPHIC(n) | Not supported. |
A varying-length string of DBCS characters of maximum length 16383. | LONG VARGRAPHIC | Not supported. |
A fixed-length character string representing a date. The minimum and maximum lengths vary with both the format used and whether it is an input or output operation. See the DB2 Server for VSE & VM SQL Reference manual for more information. | DATE |
CHARACTER
|
A fixed-length character string representing a time. The minimum and maximum lengths vary with both the format used and whether it is an input or output operation. See the DB2 Server for VSE & VM SQL Reference manual for more information. | TIME |
CHARACTER
|
A fixed-length character string representing a timestamp. The lengths can vary on input and output. See the DB2 Server for VSE & VM SQL Reference manual for more information. | TIMESTAMP |
CHARACTER
|
Notes:
An * length specification can also be used to override a length
specification associated with the initial keyword. The following are
examples:
Specification | Valid | Invalid (ignored) |
---|---|---|
INTEGER VAR001,VAR002(2) | VAR001 4 bytes | VAR002 |
INTEGER*2 VAR001*4,VAR002 | VAR001 4 bytes VAR002 2 bytes | |
INTEGER*4 VAR001*2/10/,VAR002*4 | VAR001 2 bytes VAR002 4 bytes | |
INTEGER*5 VAR001*2,VAR002*4 | VAR001,VAR002 | |
REAL VAR001*8,VAR002 | VAR001 8 bytes VAR002 4 bytes | |
REAL*8 VAR001,VAR002*4,VAR003 | VAR001 8 bytes VAR002 4 bytes VAR003 8 bytes | |
DOUBLE PRECISION VAR001,VAR002*4 | VAR001 8 bytes VAR002 4 bytes | |
REAL*8 VAR001(10,10)*4,VAR002 | VAR002 8 bytes | VAR001 |
REAL*16 VAR001,VAR002*4,VAR003*8 | VAR002 4 bytes VAR003 8 bytes | VAR001 |
CHARACTER VAR1,VAR2*80 |
VAR1 1 byte VAR2 80 bytes | |
CHARACTER*10 VAR1,VAR2*80 | VAR1 10 bytes VAR2 80 bytes | |
CHARACTER*500 VAR1(5),VAR2*1 | VAR2 1 byte | VAR1 |