Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 61
TYPE Clause
SQL VARCHAR Field Output for COBOL. The following examples show how DDL
translates definitions and descriptions of SQL VARCHAR fields into COBOL85 source
code:
SQL VARCHAR Field Output for FORTRAN. The following examples show how DDL
translates definitions and descriptions of SQL VARCHAR fields into FORTRAN source
code:
DDL Type
COBOL85 Type
DEF name TYPE SQL VARCHAR 25
VALUE "Mary".
DEF customer.
02 customer-nameTYPE name.
02 address TYPE SQL VARCHAR 29
OCCURS 10 TIMES.
END
01 NAME.
02 LEN PIC S9(4) COMP
VALUE 4.
02 VAL PIC X(25)
VALUE "Mary".
01 CUSTOMER.
02 CUSTOMER-NAME.
03 LEN PIC S9(4) COMP
VALUE 4.
03 VAL PIC X(25)
VALUE "Mary".
02 FILLER PIC X(1).
02 ADDRESS OCCURS 10 TIMES.
03 LEN PIC S9(4) COMP.
03 VAL PIC X(29).
03 FILLER PIC X(1).
DDL Type
FORTRAN Type
DEF name TYPE SQL VARCHAR 25
VALUE "Mary".
DEF customer.
02 customer-name TYPE name.
02 address TYPE SQL VARCHAR
29
OCCURS 10 TIMES.
END
RECORD NAME.
INTEGER*2 LEN
CHARACTER*25 VAL
END RECORD
RECORD CUSTOMER.
RECORD CUSTOMER-NAME.
INTEGER*2 LEN
CHARACTER*25 VAL
END RECORD
C Initial value is "Mary"
FILLER*1
RECORD ADDRESS (1:10)
INTEGER*2 LEN
CHARACTER*29 VAL
FILLER*1
END RECORD
END RECORD