Try OpenEdge Now
skip to main content
Programming Interfaces
Audit Policy Maintenance APIs : Generic utility API : has-DB-option function
 

has-DB-option function

Looks for a given option in the database information string. The database information string is returned by get-complete-dbname-listprocedure, get-dbname-listprocedure, and src/auditing/_get-db-list.p. The list of possible entries is defined in src/auditing/include/_aud-std.i.
Returns: LOGICAL
Parameters:
INPUT pcDbInfo AS CHARACTER
The database information string.
INPUT pcDbOption AS CHARACTER
String containing the entry to look for.
Example:
{auditing/include/_aud-utils.i}

DEFINE VARIABLE cdbInfo AS CHARACTER NO-UNDO.
DEFINE VARIABLE cList   AS CHARACTER NO-UNDO.
DEFINE VARIABLE cTemp   AS CHARACTER NO-UNDO.
DEFINE VARIABLE iLoop   AS INTEGER   NO-UNDO.

RUN get-dbname-list IN hAuditUtils (OUTPUT cList).

DO iLoop = 1 TO NUM-ENTRIES(cList, CHR(1)):
  ASSIGN cdbInfo = ENTRY(iLoop, cList, CHR(1))
         cTemp   = DYNAMIC-FUNCTION('get-DB-Name' IN hAuditUtils, cdbInfo).
  IF DYNAMIC-FUNCTION('has-DB-option' IN hAuditUtils, cDbInfo,     "READ-ONLY":U) THEN
    MESSAGE "Database " cTemp " is read-only".
END.