Data Retrieval Using TABLEF
TABLEF is a variation of the TABLE command that provides
a fast method of retrieving data that is already stored in the order
required for printing and requires no additional sorting.
Using TABLEF, records are retrieved in
the logical sequence from the data source. The standard report request
syntax applies, subject to the following rules:
- Any BY phrases
must be compatible with the logical sequence of the data source.
BY phrases are used only to establish control breaks, not to change
the order of the records.
- ACROSS phrases
are not permitted.
- Multiple display
commands are not permitted. Only one display command may be used.
- After the report
is executed, RETYPE, HOLD, and SAVE are not available. However, you
can produce an extract file if you include ON TABLE HOLD or ON TABLE
SAVE as part of the request.
- NOSPLIT is
not compatible with the TABLEF command, and produces a FOC037 error
- TABLEF can
be used with HOLD files and other non-FOCUS data sources when the natural
sort sequence of both the request and the data are the same.
- TABLEF is not
supported with SET EMPTYREPORT. When a TABLEF request retrieves
zero records, EMPTYREPORT behaves as if it were set to ON.
- The DST. prefix
operator is not permitted.
- BORDER styling
is not supported with TABLEF.
- TABLEF is not supported with SQUEEZE.
Example: Printing Using Fast Table Retrieval
If you previously created a HOLD file
from the EMPLOYEE data source, sorted by the CURR_SAL, LAST_NAME,
and FIRST_NAME fields, you can issue the following TABLEF request:
TABLEF FILE HOLD
PRINT CURR_SAL AND LAST_NAME AND FIRST_NAME