CBL_AUDIT_EVENT (非推奨)

監査イベントを出力します。
注: 監査マネージャーは非推奨です。下位互換性のみを目的として提供されています。代わりに syslog イベントを使用することをお奨めします。詳細については、「エンタープライズ サーバーの監査」を参照してください。
制約事項: 本トピックは、Enterprise Server 機能が有効な場合にのみ該当します。

構文:

call "CBL_AUDIT_EVENT" using by value     flags
                             by reference component-id
                             by reference audit-event
                                returning status-code
表 1. パラメーター
  型定義 PIC
flags cblt-x4-comp5 pic x(4) comp-5
component-id pic x(n) pic x(n)
audit-event cblt-aud-event 次を含むグループ
cblte-audevt-version cblt-x4-comp5 pic x(4) comp-5
cblte-audevt-flags cblt-x4-comp5 pic x(4) comp-5
cblte-audevt-id cblt-x4-comp5 pic x(4) comp-5
cblte-audevt-category cblt-x4-comp5 pic x(4) comp-5
cblte-audevt-data-count cblt-x4-comp5 pic x(4) comp-5
cblte-audevt-reserved1 cblt-x4-comp5 pic x(4) comp-5 occurs 7
cblte-audevt-event-len cblt-pointer pointer
cblte-audevt-event-type cblt-pointer pointer
cblte-audevt-event-data cblt-pointer pointer
cblte-audevt-reserved2 cblt-pointer pointer occurs 7

入力パラメーター:

Control flags

ビット 意味
0-12 予約済み 予備 (値は常に 0)
13 0 cblte-audevt-event-data は、さまざまなサイズおよびタイプのデータをトレースするためのポインターの配列です。cblte-audevt-event-len 配列および cblte-audevt-event-type 配列の対応する要素を設定する必要があります。
  1 cblte-audevt-event-data は、同じサイズおよびタイプのデータをトレースするためのポインターの配列です。cblte-audevt-event-len および cblte-audevt-event-type の最初の要素のみを設定する必要があります。
14-29   予備 (値は常に 0)
30 0 component-id は空白文字で終了します。
  1 component-id は null で終了します。
    (ビット 31 を設定しない場合は無視される)
31 0 component-id は、CBL_AUDIT_HANDLE_GET (pic x(4) comp-5) によって作成された監査ハンドルです。
  1 component-id は、テキスト文字列 (pic x(n)) です。文字列の終了文字はビット 30 で定義されます。
component-id
コンポーネント識別子。これは、flags のビット 31 が設定されていない場合は pic x(4) comp-5 トレーサー ハンドル (コンポーネントでの監査ハンドルの取得方法の詳細については、「CBL_AUDIT_HANDLE_GET (非推奨)」を参照)、flags のビット 31 が設定されている場合は pic x(n) テキスト識別子になります。
cblte-audevt-version
構造体のバージョン。値は常に 0 です。
cblte-audevt-flags
制御フラグ。値は常に 0 です。
cblte-audevt-id
出力されるイベントのタイプを識別するために使用される、コンポーネントに固有の監査イベント識別子。
cblte-audevt-category
出力される監査イベントのカテゴリ。
値 カテゴリ 
0 不明 
1 監査機能 
2 システム 
3 セキュリティ API 要求:チェック 
4 セキュリティ API 要求:定義 
5 セキュリティ API 要求:その他 
6 セキュリティ API 結果:許可 
7 セキュリティ API 結果:拒否 
8 セキュリティ API 結果:エラー 
9 セキュリティ API 結果:成功 
cblte-audevt-data-count
監査データ項目の数。cblte-audevt-event-len 配列、cblte-audevt-event-type 配列、および cblte-audevt-event-data 配列の要素数を示します。0 の場合もあります。
cblte-audevt-event-len
4 バイトの comp-5 項目の配列へのポインター。配列の各要素は、cblte-audevt-event-data 配列内の対応する監査データ項目の長さを示します。cblte-audevt-data-count が 0 の場合は NULL になります。
cblte-audevt-event-type
4 バイトの comp-5 項目の配列へのポインター。配列の各要素は、cblte-sudevt-event-data 配列内の対応する監査データ項目のタイプを示します。cblte-audevt-data-count が 0 の場合は NULL になります。
値 タイプ 
0 バイナリ 
1 テキスト (ローカル エンコーディング) 
2 アドレス 
3 COMP-5 
4 COMP-X 
5 UTF8 
6 符号付き COMP-5 
7 符号付き COMP-X 
cblte-audevt-event-data
ポインター項目の配列へのポインター。配列の各要素は、cblte-audevt-event-type 配列および cblte-audevt-event-len 配列内の対応する要素によって示されるタイプおよび長さの監査データ項目に対処します。cblte-audevt-data-count が 0 の場合は NULL になります。

注意:アドレス タイプの項目の場合、配列要素は、アドレス値へのポインターではなくアドレス値です。

出力パラメーター:

なし

戻りコード:

78-AUD-RET-SUCCESS
78-AUD-RET-INVALID-HANDLE
78-AUD-RET-INVALID-AUDIT-CATEGORY
78-AUD-RET-NOT-ENOUGH-MEMORY
78-AUD-RET-OUTPUT-ERROR
78-AUD-RET-INVALID-COMPONENT-NAME
78-AUD-RET-NO-SERVER-PROCESS
78-AUD-RET-ACCESS-DENIED
78-AUD-RET-TIMEDOUT

説明:

なし

例:

copy "mfaudit.cpy".

78 78-EVENT-TYPE-A      value 1.
78 78-EVENT-TYPE-B      value 2.

01 audit-event          cblt-aud-event.
01 audit-event-lengths  pic x(4) comp-5 occurs 1.
01 audit-event-pointers pointer occurs 1.
01 audit-event-types    pic x(4) comp-5 occurs 1.
01 audit-handle         pic x(4) comp-5.
01 audit-info           pic x(10).
01 component-id         pic x(7) value "mycomp ".
01 flags                pic x(4) comp-5.

...
move low-values to audit-event

set cblte-audevt-event-len of audit-event to
    address of audit-event-lengths(1)
set cblte-audevt-event-type of audit-event to
    address of audit-event-types(1)
set cblte-audevt-event-data of audit-event
    to address of audit-event-pointers(1)

1) "mycomp" コンポーネントの監査イベントをトレースするための監査ハンドルを取得し、2 つの監査イベント (イベント データを含むものと含まないもの) を出力します。

call "CBL_AUDIT_HANDLE_GET" using by value 0
                                  by reference component-id
                                  by reference audit-handle
...
move 0 to flags
move 78-AUD-FLAG-CATEGORY-UNKNOWN to
     cblte-audevt-category of audit-event
move 78-EVENT-TYPE-A to cblte-audevt-id of audit-event
move 1 to cblte-audevt-data-count of audit-event
move length of audit-info to audit-event-lengths(1)
move 78-AUDIT-EVENT-TYPE-TEXT to audit-event-types(1)
set audit-event-pointers(1) to address of audit-info

call "CBL_AUDIT_EVENT" using by value flags 
                             by reference audit-handle
                             by reference audit-event
...
move 78-EVENT-TYPE-B to cblte-audevt-id of audit-event
move 0 to cblte-audevt-data-count of audit-event

call "CBL_AUDIT_EVENT" using by value flags 
                             by reference audit-handle
                             by reference audit-event
...

2) 監査ハンドルを取得せずに、"mycomp" コンポーネントの 2 つの情報イベントを出力します。

...
move 78-AUD-FLAG-COMPID-STRING to flags
move 78-AUD-FLAG-CATEGORY-UNKNOWN to
     cblte-audevt-category of audit-event
move 78-EVENT-TYPE-A to cblte-audevt-id of audit-event
move 1 to cblte-audevt-data-count of audit-event
move length of audit-info to audit-event-lengths(1)
move 78-AUDIT-EVENT-TYPE-TEXT to audit-event-types(1)
set audit-event-pointers(1) to address of audit-info

call "CBL_AUDIT_EVENT" using by value flags 
                             by reference component-id
                             by reference audit-event
...
move 78-EVENT-TYPE-B to cblte-audevt-id of audit-event
move 0 to cblte-audevt-data-count of audit-event

call "CBL_AUDIT_EVENT" using by value flags 
                             by reference component-id
                             by reference audit-event
...