|
SAS/IntrNet 8.2: Application Dispatcher |
|
Syntax
Arguments
Details
Examples
RC = APPSRV_AUTHLIB( libname, memname, memtype, objname, objtype )
All arguments to this function are optional.
The APPSRV_AUTHLIB function determines if the Application Server program is authorized to access the specified data source. The function returns a value of 1 if authorized and 0 if not authorized. Authorization is determined by the contents of the AUTHLIB data set. This data set contains rules for including and excluding various data sources. For more details on the AUTHLIB data set, see Controlling Access to Data Sources with the AUTHLIB Data Set. An asterisk (*) can be supplied for any of the arguments to mean "any." If an argument is omitted, then an asterisk is assumed.
For the examples in Table 2, refer to the contents of the SASHELP.AUTHLIB data set in Table 1. Entities are excluded by default, and all exclude rules supersede all include rules.
| Rule | Libname | Memname | Memtype | Objname | Objtype |
|---|---|---|---|---|---|
| INCLUDE | SASHELP | * | DATA | * | * |
| INCLUDE | SASHELP | * | VIEW | * | * |
| INCLUDE | SASHELP | * | MDDB | * | * |
| INCLUDE | SAMPDAT | * | * | * | * |
| EXCLUDE | SAMPDAT | MYCAT | CATALOG | * | * |
| SAS Statements | Results |
|---|---|
rc=appsrv_authlib('SASHELP','RETAIL','DATA');
put rc=;
/*equivalent to
rc=appsrv_authlib('SASHELP','RETAIL','DATA','*','*');
*/
|
rc=1 |
if (appsrv_authlib('SASHELP','CORE','CATALOG'))
put 'You may proceed ...';
else put 'You are not authorized to access this
SAS catalog';
/*equivalent to
if (appsrv_authlib('SASHELP','CORE','CATALOG','*','*'))
*/
|
You are not authorized to access this SAS catalog. |
/*Check to see if access to any SCL catalog
entries is allowed*/
/*NOTE: A true (1) response does not mean that
you can see ALL SCL entries, just some.*/
/*This returns true because some catalogs in
SAMPDAT are included*/
rc = appsrv_authlib('*','*','CATALOG','*','SCL');
put rc=;
|
rc=1 |
/*Check to see if access to any of the entries
in the MYDATA.MYCAT catalog is allowed*/
rc = appsrv_authlib('SAMPDAT','MYCAT','CATALOG');
if (rc = 1) then put 'You can access at least some
of the entries';
else put 'Access to this entire catalog is
restricted';
|
Access to this entire catalog is restricted. |
|
SAS/IntrNet 8.2: Application Dispatcher |
|