rem
rem $Id: srw6lmt.sql,v 1.1 1998/11/03 07:00:43 yxia Exp $
rem

rem  +------------------------------------------------------------------+
rem  |  SRW2LMT.SQL -- SET PAGE LIMIT FOR A GIVEN USER                  |
rem  |                                                                  |
rem  |  This script is used by the DBA to set a page limit for a user.  |
rem  |  The value is written to the product_profile table, which can    |
rem  |  be created by the srw_pup.sql script if it does not already     |
rem  |  exist.  The user name may be wildcarded, however care should    |
rem  |  be taken to avoid having more than one limit applicable to a    |
rem  |  particular user.  To create the default limit, use PUBLIC as    |
rem  |  the username, rather than % or _DEFAULT_ (from SRW 1.0)         |
rem  +------------------------------------------------------------------+

accept usrnm char prompt 'Add limit for user: ';

accept mxpgs number prompt 'Enter page limit for &usrnm (0 = no limit): ';

set verify off;

delete from system.product_profile
  where product       = 'SQL*ReportWriter'
    and attribute     = 'PAGE_LIMIT'
    and upper(userid) = upper('&usrnm');

insert into system.product_profile (product, userid, attribute, numeric_value)
 values ('SQL*ReportWriter', upper('&usrnm'), 'PAGE_LIMIT', &mxpgs);

set verify on;
