Focal Point
Limit rows from source

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2127080576

March 11, 2015, 06:27 AM
Aimar Arak
Limit rows from source
Is there a way to limit row count from source. Can it be done in master file?
I know you can limit output at report, but I need it to be limited at source. Any advises?

Aimar
WebFOCUS 8008, Windows


WebFOCUS 8.2.XX
March 11, 2015, 07:07 AM
MartinY
Hi Aimar,

What do you mean be "limited at source" ?
Would you like to limit available records based on user security access ? If so you must consider master file DBA security (lots of post on it and documentation).

Otherwise you can use
WHERE READLIMIT EQ 10;

in your TABLE FILE. It will only read the first 10 records.

Provide more information if not what you're looking for.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
March 11, 2015, 08:03 AM
Aimar Arak
Mi Martin,

I mean that I can limit the number of rows at metadata level in master file. I found an old example from Cases:
For example, using the CAR master, I created a new master called CARLIMIT
with the following lines added to the end of the master:

END
DBA=DBA,$
USER=,ACCESS=R,RESTRICT=VALUE,NAME=SYSTEM,VALUE=RECORDLIMIT EQ 10,$

Then, when I ran the following request:

TABLE FILE CARLIMIT
PRINT *
END

only 10 records were returned instead of the 18 records that it would
have retrieved without this retriction. You can see in the view source
the status line of the request:

0 NUMBER OF RECORDS IN TABLE= 10 LINES= 10
ACCESS LIMITED BY PASSWORD

You can accomplish the same effect without DBA using FILTER FILE and
SET FILTER commands. However, these commands must be at a global level.
I will send you a separate email with a presentation on FILTERs that
shows how to create it and activiate it.

But this RECORDLIMIT example does not work - gives an error if I try to save master file.


WebFOCUS 8.2.XX