Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 43
SQLNULLABLE Clause
SQL-Nullable Output for TACL. The following example shows how DDL translates
definitions and descriptions of SQL-nullable items into TACL source code:
SQL-Nullable Output for pTAL and TAL. The following example shows how DDL
translates definitions and descriptions of SQL-nullable items into pTAL or TAL
source code:
DDL Type
TACL 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.
?Section B Struct
Begin
STRUCT NAME;
BEGIN CHAR BYTE(0:24); END;
FILLER 1;
STRUCT NICKNAME;
Begin
INT INDICATOR;
STRUCT VALU;
BEGIN CHAR BYTE(0:9); END;
End;
INT SALARY
STRUCT HIRE^DATE;
BEGIN CHAR BYTE(0:9); END;
STRUCT SUBORDINATE(0:9);
Begin
INT INDICATOR;
STRUCT VALU;
Begin
INT LEN;
STRUCT VAL;
BEGIN CHAR BYTE(0:14); END;
End;
FILLER 1;
End;
End;
DDL Type
pTAL or TAL 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.
STRUCT B^DEF (*) FIELDALIGN (SHARED2);
BEGIN
STRUCT NAME;
BEGIN STRING BYTE[1:25]; END;
FILLER 1;
STRUCT NICKNAME;
BEGIN
INT INDICATOR;
STRUCT VALU;
BEGIN STRING BYTE[1:10]; END;
END;
INT SALARY
STRUCT HIRE^DATE;
BEGIN STRING BYTE[1:10]; END;
STRUCT SUBORDINATE[1:10];
BEGIN
INT INDICATOR;
STRUCT VALU;
BEGIN
INT LEN;
STRING VAL[1:15];
END;
FILLER 1;
END;
END;