If you are working with a large data source and want to test report requests to see if they work, use RECORDLIMIT. Instead of processing hundreds or thousands of records to test your design, you could see results just as effectively by processing and displaying a few.
RECORDLIMIT retrieves the number of records that meet test conditions specified in a request. For instance, if five (5) employees live in New Jersey and you want to retrieve only those records, you would use a RECORDLIMIT of five (5). As soon as the fifth record is retrieved, the searching of the data source stops.
To see how RECORDLIMIT works, first issue the following request without using RECORDLIMIT:
TABLE FILE EMPLOYEE PRINT LAST_NAME FIRST_NAME EMP_ID END
Notice that the statistics display the following:
NUMBER OF RECORDS IN TABLE= 12 LINES= 12
Run the request. The output is:
To limit the records to four (4), issue the following request:
TABLE FILE EMPLOYEE PRINT LAST_NAME FIRST_NAME EMP_ID WHERE RECORDLIMIT EQ 4; END
The statistics reflect the number specified in the RECORDLIMIT command:
NUMBER OF RECORDS IN TABLE= 4 LINES= 4
Run the request. The output is:
You can see the difference in the statistics. The structure of your report does not change so you can evaluate it as effectively and save time using fewer records.
WebFOCUS | |
Feedback |