After you declare structure items in an SQL record part, you can use a special mechanism in the EGL editor to create DataItem parts that are equivalent to the structure items. The benefit is that you can more easily create a non-SQL record (usually a basic record) for transferring data to and from the related SQL record at run time.
10 myHostVar01 CHAR(3); 10 myHostVar02 BIN(9,2);
DataItem myHostVar01 CHAR(3) end DataItem myHostVar02 BIN(9,2) end
10 myHostVar01 myHostVar01; 10 myHostVar02 myHostVar02;
As shown in this example, each dataItem part is given the same name as the related structure item and acts as a typedef for the structure item. Each DataItem part is also available as a typedef for other structure items.
Before you can use a structure item as the basis of a dataItem part, the structure item must have a name, must have valid primitive characteristics, and must not point to a typedef.
Related concepts
SQL support
Related tasks
Creating dataItem parts from an SQL record part
Related reference
DataItem part in EGL source format
SQL record part in EGL source format