Data Definition Language (DDL) Reference Manual
DDL Compiler Commands
Data Definition Language (DDL) Reference Manual—529431-004
9-56
EXPANDC
EXPANDC
The [NO]EXPANDC command generates a C referenced type definition inline [as a 
structure name].
Default: NOEXPANDC
EXPANDC
generates a referenced type definition inline.
NOEXPANDC
generates a referenced type definition as a structure name.
A referenced definition type is a type of a line item and is a definition defined prior to 
the line item that references it.
In C applications, a structure being referenced by a line item is not always in the same 
module. Further, the structure being referenced can refer to yet another structure that 
might be in another module. Without inline expansion, a dependency chain or modules 
must be developed to ensure proper resolution of references.
The EXPANDC command does not apply to type ENUM, because the C compiler 
requires each enumerator to be unique. For ENUM types, the DDL compiler outputs a 
referenced type definition as a structure name. The DDL compiler generates a C 
enumerator for each level-89 clause in a type ENUM definition.
[NO]EXPANDC
Example 9-25. EXPANDC Command (page 1 of 2)
DDL Definition
C Output
With NOEXPANDC With EXPANDC
def a pic x (10). typedef char a_def[10];
#pragma fieldalign shared2 __b
Same as NOEXPANDC
def b.
 2 b1 type binary.
 2 b2 pic x(10).
 2 b3 occurs 5 times.
 3 b31 type binary.
 3 b32 pic x(10).
end
typedef struct __b
{
 short b1;
 char b2[10];
 struct
 {
 short b31;
 char b32[10];
 } b3[5];
} b_def;
Same as NOEXPANDC
def c type a. typedef a_def c_def; typedef char c_def[10];
#pragma fieldalign 
shared2 __d










