Administrative API Reference

sqluadau - Get Authorizations

Reports the authorities of the current user from values found in the database manager configuration file and the authorization system catalog view (SYSCAT.DBAUTH).

Authorization

None

Required Connection

Database

Version

sqlutil.h

C API Syntax



/* File: sqlutil.h */
/* API: Get Authorizations */
/* ... */
SQL_API_RC SQL_API_FN
  sqluadau (
    struct sql_authorizations * pAuthorizations,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlutil.h */
/* API: Get Authorizations */
/* ... */
SQL_API_RC SQL_API_FN
  sqlgadau (
    struct sql_authorizations * pAuthorizations,
    struct sqlca * pSqlca);
/* ... */
 

API Parameters

pAuthorizations
Input/Output. Pointer to the sql_authorizations structure. This array of short integers indicates which authorizations the current user holds. The first element in the structure, sql_authorizations_len, must be initialized to the size of the buffer being passed, prior to calling this API. For more information about the sql_authorizations structure, see SQL-AUTHORIZATIONS.

pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

REXX API Syntax



GET AUTHORIZATIONS :value

REXX API Parameters

value
A compound REXX host variable to which the authorization level is returned. In the following, XXX represents the host variable name. Values are 0 for no, and 1 for yes.

XXX.0
Number of elements in the variable (always 18)

XXX.1
Direct SYSADM authority

XXX.2
Direct DBADM authority

XXX.3
Direct CREATETAB authority

XXX.4
Direct BINDADD authority

XXX.5
Direct CONNECT authority

XXX.6
Indirect SYSADM authority

XXX.7
Indirect DBADM authority

XXX.8
Indirect CREATETAB authority

XXX.9
Indirect BINDADD authority

XXX.10
Indirect CONNECT authority

XXX.11
Direct SYSCTRL authority

XXX.12
Indirect SYSCTRL authority

XXX.13
Direct SYSMAINT authority

XXX.14
Indirect SYSMAINT authority

XXX.15
Direct CREATE_NOT_FENC authority

XXX.16
Indirect CREATE_NOT_FENC authority

XXX.17
Direct IMPLICIT_SCHEMA authority

XXX.18
Indirect IMPLICIT_SCHEMA authority.

XXX.19
Direct LOAD authority.

XXX.20
Indirect LOAD authority.

Sample Programs

C
\sqllib\samples\c\dbauth.sqc

COBOL
\sqllib\samples\cobol\dbauth.sqb

REXX
\sqllib\samples\rexx\dbauth.cmd

Usage Notes

Direct authorities are acquired by explicit commands that grant the authorities to a user ID. Indirect authorities are based on authorities acquired by the groups to which a user belongs.
Note:PUBLIC is a special group to which all users belong.

If there are no errors, each element of the sql_authorizations structure contains a 0 or a 1. A value of 1 indicates that the user holds that authorization; 0 indicates that the user does not.


[ Top of Page | Previous Page | Next Page ]