|
An extract dataset
consists of a sequence of records of a pre-defined structure. However, the
structure need not be identical for all records. In one extract dataset, you can
store records of different length and structure one after the other. You need
not create an individual dataset for each different structure you want to store.
This fact reduces the maintenance effort considerably.
In contrast to
internal tables, the system partly compresses extract datasets when storing
them. This reduces the storage space required. In addition, you need not specify
the structure of an extract dataset at the beginning of the program, but you can
determine it dynamically during the flow of the program.
You can use control
level processing with extracts just as you can with internal tables. The
internal administration for extract datasets is optimized so that it is quicker
to use an extract for control level processing than an internal table.
Procedure for
creating an extract:
-
Define the record
types that you want to use in your extract by declaring them as field groups.
The structure is defined by including fields in each field group. -----
Defining an Extract -----
-
Fill the extract
line by line by extracting the required data.------
Filling an Extract with
Data -----
-
Once you have
filled the extract, you can sort it and process it in a loop. At this stage,
you can no longer change the contents of the extract. ------
Processing
Extracts ------
|