Product Documentation

c-treeRTG COBOL Edition User's Guide

Previous Topic

Next Topic

Splitting an OCCURR

The first elements of the record are actually a split of the OCCURR GROUP-TITLE-INFO that follows it, but with each field identified separately. This is included in this tutorial to demonstrate a possible solution to use fields within an OCCURR as indexes of a file in SQL. Without this split, c-treeRTG would not be able to properly identify the field CARD-FAMILY-NUMBER-1 in order to build a SQL index using it. This is needed only in cases where you need a sub-group of an OCCURR to be used as a SQL index. Notice that this would not be required if this file would be accessible only by COBOL programs.


*>>XDD USE GROUP

10 CARD-FAMILY-NUMBER-1.

15 CARD-LABEL-NUMBER-1 PIC 9(4).

15 CARD-MAIN-NUMBER-1 PIC 9(8).

15 CARD-NUMBER-CRC-1 PIC 9(2).

*>>XDD DATE = YYMMDD

10 EMISSION-DATE-1 PIC 9(6) COMP-6.

TOCIndex