Information Technology Reference
In-Depth Information
Fig. 4.5 A sample hierarchi-
cal schema
DNO
MGR
BUDGET
ENO
JOB
PJNO
LEADER
ITEMNO
DESC
Its DEFINE statements can be described in the following where for each DEFINE
statement, code is generated to allocate a new subtree in the internal buffer.
GROUP DEPT:
OCCURS FROM 1TIMES;
FOLLOWED BY EOF;
PRECEDED BY HEX '01';
:
ENDEMP;
GROUPPROJ:
OCCURS FROM 0TIMES;
PRECEDED BY HEX'03';
:
ENDPROJ;
ENDDEPT;
For each user-written CONVERT statement, we can produce a customized pro-
gram. Take the DEPT FORM from the above DEFINE statement:
T1 = SELECT (FROM DEPT WHERE BUDGET GT '100');
will produce the following program:
/* PROCESSLOOPFOR T1 */
DO WHILE(notend of file);
CALL GET(DEPT);
IF BUDGET > '100'
THEN CALL BUFFER_SWAP(T1,DEPT);
Search WWH ::




Custom Search