How to: |
For some reports, a limited number of records is satisfactory. When the specified number of records is retrieved, record retrieval can stop. This is useful when:
There are two ways to limit the number of records retrieved. You can use
WHERE RECORDLIMIT EQ n
where:
For all non-FOCUS data sources, you can also use
WHERE READLIMIT EQ n
where:
Tip: If an attempt is made to apply the READLIMIT test to a FOCUS data source, the request is processed correctly, but the READLIMIT phrase is ignored.
Note: Using SET RECORDLIMIT disables AUTOINDEX.
The following request retrieves four records, generating a four-line report:
TABLE FILE EMPLOYEE PRINT LAST_NAME AND FIRST_NAME AND EMP_ID WHERE RECORDLIMIT EQ 4 END
The output is:
LAST_NAME FIRST_NAME EMP_ID --------- ---------- ------ STEVENS ALFRED 071382660 SMITH MARY 112847612 JONES DIANE 117593129 SMITH RICHARD 119265415