Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mqseries_get(3) [php man page]

MQSERIES_GET(3) 							 1							   MQSERIES_GET(3)

mqseries_get - MQSeries MQGET

SYNOPSIS
void mqseries_get (resource $hConn, resource $hObj, array &$md, array &$gmo, int &$bufferLength, string &$msg, int &$data_length, resource &$compCode, resource &$reason) DESCRIPTION
The mqseries_get(3) (MQGET) call retrieves a message from a local queue that has been opened using the mqseries_open(3) (MQOPEN) call PARAMETERS
o $hConn -Connection handle.This handle represents the connection to the queue manager. o $hObj -Object handle.This handle represents the object to be used. o $md -Message descriptor (MQMD). o $gmo -Get message options (MQGMO). o $bufferLength -Expected length of the result buffer o $msg - Buffer holding the message that was retrieved from the object. o $data_length -Actual buffer length o $compCode -Completion code. o $reason -Reason code qualifying the compCode. RETURN VALUES
No value is returned. EXAMPLES
Example #1 mqseries_get(3) example <?php // 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 queueu 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<br>", $comp_code, $reason, mqseries_strerror($reason)); } // 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) ?> SEE ALSO
mqseries_conn(3), mqseries_connx(3), mqseries_open(3), mqseries_put(3). PHP Documentation Group MQSERIES_GET(3)

Check Out this Related Man Page

DB2_CONN_ERRORMSG(3)							 1						      DB2_CONN_ERRORMSG(3)

db2_conn_errormsg - Returns the last connection error message and SQLCODE value

SYNOPSIS
string db2_conn_errormsg ([resource $connection]) DESCRIPTION
db2_conn_errormsg(3) returns an error message and SQLCODE value representing the reason the last database connection attempt failed. As db2_connect(3) returns FALSE in the event of a failed connection attempt, do not pass any parameters to db2_conn_errormsg(3) to retrieve the associated error message and SQLCODE value. If, however, the connection was successful but becomes invalid over time, you can pass the $connection parameter to retrieve the associ- ated error message and SQLCODE value for a specific connection. PARAMETERS
o $connection - A connection resource associated with a connection that initially succeeded, but which over time became invalid. RETURN VALUES
Returns a string containing the error message and SQLCODE value resulting from a failed connection attempt. If there is no error associ- ated with the last connection attempt, db2_conn_errormsg(3) returns an empty string. EXAMPLES
Example #1 Retrieving the error message returned by a failed connection attempt The following example demonstrates how to return an error message and SQLCODE value after deliberately passing invalid parameters to db2_connect(3). <?php $conn = db2_connect('badname', 'baduser', 'badpassword'); if (!$conn) { print db2_conn_errormsg(); } ?> The above example will output: [IBM][CLI Driver] SQL1013N The database alias name or database name "BADNAME" could not be found. SQLSTATE=42705 SQLCODE=-1013 SEE ALSO
db2_conn_error(3), db2_connect(3), db2_stmt_error(3), db2_stmt_errormsg(3). PHP Documentation Group DB2_CONN_ERRORMSG(3)
Man Page