Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 42
SQLNULLABLE Clause
SQL-Nullable Output for FORTRAN. The following example shows how DDL
translates definitions and descriptions of SQL-nullable items into FORTRAN source
code:
SQL-Nullable Output for Pascal. The following example shows how DDL translates
definitions and descriptions of SQL-nullable items into Pascal source code:
DDL Type
FORTRAN Type
DEF B SQLNULLABLE.
02 name PIC X(25)
NOT SQLNULLABLE.
02 nickname PIC X(10)
VALUE SQLNULL.
02 salary TYPE BINARY
NOT SQLNULLABLE.
02 hire-date TYPE SQL DATE
NOT SQLNULLABLE.
02 subordinate TYPE SQL VARCHAR 15
OCCURS 10 TIMES.
END.
RECORD B.
CHARACTER*25 NAME
FILLER*1
RECORD NICKNAME.
INTEGER*2 INDICATOR
CHARACTER*10 VALU
END RECORD
INTEGER*2 SALARY
CHARACTER*10 HIREDATE
RECORD SUBORDINATE
INTEGER INDICATOR
RECORD VALU
INTEGER LEN
CHARACTER*15 VAL
END RECORD
FILLER*1
END RECORD
END RECORD
DDL Type
Pascal Type
DEF B SQLNULLABLE
02 name PIC X(25)
NOT SQLNULLABLE.
02 nickname PIC X(10)
VALUE SQLNULL.
02 salary TYPE BINARY
NOT SQLNULLABLE.
02 hire-date TYPE SQL DATE
NOT SQLNULLABLE.
02 subordinate TYPE SQL VARCHAR 15
OCCURS 10 TIMES.
END.
TYPE B_DEF = RECORD
NAME : FSTRING(25);
NICKNAME : RECORD
INDICATOR : INT16;
VALU : FSTRING(10);
END;
SALARY : INT16;
HIRE_DATE : FSTRING(10);
SUBORDINATE : Array[1..10]
of RECORD
INDICATOR : INT16;
VALU : STRING(15);
END;
END;