関数・クラス解説
mqseries_get
version:PECL mqseries >= 0.10.0 (公式)MQSeries MQGET
公式リファレンス
書式
mqseries_get ( resource $hConn , resource $hObj , array &$md , array &$gmo , int &$bufferLength , string &$msg , int &$data_length , resource &$compCode , resource &$reason ) : void
説明
The mqseries_get() (MQGET) call retrieves a message from a local queue that has been opened using the mqseries_open() (MQOPEN) call
パラメータ
- hConn
 - Connection handle. This handle represents the connection to the queue manager.
 - hObj
 - Object handle. This handle represents the object to be used.
 - md
 - Message descriptor (MQMD).
 - gmo
 - Get message options (MQGMO).
 - bufferLength
 - Expected length of the result buffer
 - msg
 - Buffer holding the message that was retrieved from the object.
 - data_length
 - Actual buffer length
 - compCode
 - Completion code.
 - reason
 - Reason code qualifying the compCode.
 
返値
値を返しません。
サンプル
例1 mqseries_get() example 
 
// open connection to the queue manager
    mqseries_conn('WMQ1', $conn, $comp_code, $reason);
// $conn now hold the reference to the connection to the queue manager.
// open the connection to the testq queue
    mqseries_open(
                $conn,
                array('ObjectName' => 'TESTQ'),
                MQSERIES_MQOO_INPUT_AS_Q_DEF | MQSERIES_MQOO_FAIL_IF_QUIESCING | MQSERIES_MQOO_OUTPUT,
                $obj,
                $comp_code,
                $reason);
// $obj now holds the reference to the object (TESTQ)
// setup empty message descriptor.
    $mdg = array();
// setup get message options    
    $gmo = array('Options' => MQSERIES_MQGMO_FAIL_IF_QUIESCING | MQSERIES_MQGMO_WAIT, 'WaitInterval' => 3000);
// get the message from the queue    
    mqseries_get($conn, $obj, $mdg, $gmo, 255, $msg, $data_length, $comp_code, $reason);
    if ($comp_code !== MQSERIES_MQCC_OK) {
        printf("GET CompCode:%d Reason:%d Text:%s
", $comp_code, $reason, mqseries_strerror($reason));
    }
    
// close the object reference $obj    
    mqseries_close($conn, $obj, MQSERIES_MQCO_NONE, $comp_code, $reason);
// disconnect from the queue manager.    
    mqseries_disc($conn, $comp_code, $reason);
    
参考
ワード検索
※入力キーワードが、関数名・説明文・タグに含まれるものを検索関数名アルファベット別
最終更新一覧
●stristr
 大文字小文字を区別せず文字列を検索し、ヒット箇所以降(あるいは以前)の文字列を返却
●stripslashes
 バックスラッシュでエスケープされた文字列から、バックスラッシュを取り除く
●stripos
 大文字小文字を区別せずに文字列が最初に現れる位置を取得する
●stripcslashes
 addcslashes() でクォートされた文字列をアンクォートする
●strip_tags
 文字列から HTML と PHP のタグを除去して返却
●strcspn
 指定した文字が最初に現れる位置を調べる
●strcoll
 ロケールに基づいて2つの文字列を比較し同じか(あるいは大小)を判定する
●strcmp
 2つの文字列を比較し同じか(あるいは大小)を判定する
●strchr
 strstr() のエイリアス
●strcasecmp
 2つの文字列を比較(大文字小文字を区別せず同じとみなす)
カテゴリー一覧
PHP の振る舞いの変更
音声フォーマットの操作
認証サービス
コマンドライン関連
圧縮およびアーカイブ
暗号
データベース関連
日付および時刻関連
ファイルシステム
自然言語および文字エンコーディング
画像処理および作成
メール関連
数学
テキスト以外の MIME 型
プロセス制御
その他の基本モジュール
その他のサービス
検索エンジン用の拡張モジュール
サーバー固有のモジュール
セッション関連
テキスト処理
変数・データ型関連
ウェブサービス
Windows 用のモジュール
XML 操作
GUI用の拡張モジュール