EXTRACT [ header | field_group ].
This statement links the current content of the fields, which were until then included in the field group header resp. field_group via the statement INSERT , to the extract dataset of the program. If there is no field group specified after EXTRACT, then the field group header is implicitly added.
At the first execution of the EXTRACT-statement of a program,
the extract dataset is created and the first line added. After execution of an
EXTRACT-statement, it is not allowed to incorporate other fields to the specified field group
field_group with the INSERT
statement. If you do so, an uncatchable exception will be raised at the next EXTRACT-statement for the same field group.
This example continues the example under INSERT. If the executable program is linked to a fitting logical data base, the fields of the field groups flight_info and flight_date are attached to the extract dataset during the GET-events.
REPORT demo_extract.
NODES: spfli, sflight.
FIELD-GROUPS: header, flight_info, flight_date.
START-OF-SELECTION.
INSERT: spfli-carrid spfli-connid sflight-fldate
INTO header,
spfli-cityfrom spfli-cityto
INTO flight_info.
GET spfli.
EXTRACT flight_info.
GET sflight.
EXTRACT flight_date.
Non-Catchable Exceptions