Previous Topic Next topic Print topic


CBL_AUDIT_CONFIG_PROPERTY_GET

Get an audit configuration property value.

Syntax:

call "CBL_AUDIT_CONFIG_PROPERTY_GET" using by value     flags
                                           by reference property-name
                                           by reference property-vallen
                                           by reference property-value
                                              returning status-code

Parameters:

  Typedef Picture
flags cblt-x4-comp5 pic x(4) comp-5
property-name pic x(n) pic x(n)
property-vallen cblt-x4-comp5 pic x(4) comp-5
property-value pic x(n) pic x(n)

On Entry:

Control flags

Bit Value Meaning
0 0 Return string value. Use bit 1 to determine string terminator
  1 Return integer value. Ignore bit 1.
1 0 Return the value as a space-terminated string
  1 Return the value as a null-terminated string
2-28   Reserved for future use (must be 0)
29 0 property-name is space-terminated
  1 property-name is null-terminated
30-31   Reserved for future use (must be 0)

property-name: Space- or null- terminated (depending upon setting of bit 29) case-insensitive property name.

NAME mfauditmgr instance name to connect, or are connected, to
NOSERVER_ACTION indicates the desired behaviour of the CBL_AUDIT_EVENT API when the mfauditmgr process is not running. A value of "wait" indicates the API will block (the default). A value of "nowait" indicates the API will return an error.
SYSTEM name of the system to be associated with audit events output by this process
TIMEOUT the duration (in milliseconds) that an event will retry to be written to output before it times out.

property vallen: Length of property-value buffer in which property value is to be returned. The routine fails if this is too small for the value to be returned. This parameter is ignored if value is being returned as an integer.

On Exit:

property-vallen Length of returned string value in property-value buffer. Length does not include termination character.

If property-value is null, or if the specified buffer length is too small for the value to be returned, property-vallen will be set to the required buffer length.

This parameter is not set if the value is being returned as an integer.

property-value Buffer in which the property value is to be returned. This is either a pic x(n) field for a value being returned as a string, or a pic x(4) comp-5 field for a value being returned as an integer.

A null property-value may be specified to request that the API returns the required buffer length to hold the specified property value.

Return Codes:

78-AUD-RET-SUCCESS
78-AUD-RET-NOT-ENOUGH-MEMORY
78-AUD-RET-PROPERTY-NOT-FOUND
78-AUD-RET-BUFFER-TOO-SMALL
78-AUD-RET-VALUE-NOT-INTEGER
78-AUD-RET-INVALID-PROP-NAME

Comments:

CBL_AUDIT_CONFIG_PROPERTY_GET is used to retrieve a named property value associated with the audit facility's configuration for the current process.

Supported properties are yet to be defined.

Examples:

Get the value associated with the audit facility's "system" property.

copy "mfaudit.cpy" .

01 flags           pic x(4) comp-5.
01 prop-len        pic x(4) comp-5.
01 prop-string     pic x(100).
...
compute flags = 78-AUD-FLAG-PROP-STRING-VALUE
move length of prop-string to prop-len

call "CBL_AUDIT_CONFIG_PROPERTY_GET" using
                                     by value flags
                                     by reference "system "
                                     by reference prop-len
                                     by reference prop-string
...
Previous Topic Next topic Print topic