WebSphere MQ Call Routines |
Syntax | |
Arguments | |
Details | |
Example |
Syntax |
CALL MQGET(hConn, hObj, hmd, hgmo, msglen, compCode, reason); |
Numeric, input
Specifies the WebSphere MQ connection handle that is obtained from a previous MQCONN function call.
Numeric, input
Specifies the WebSphere MQ handle to an open object that is obtained from a previous MQOPEN call.
Numeric, input
Specifies the Base SAS internal message descriptor handle that is obtained from a previous MQMD function call.
Numeric, input
Specifies the Base SAS internal get message options handle that is obtained from a previous MQGMO function call.
Numeric, output
Returns the length of the received message. A length of zero signifies a message with no data. In that case, there is no need to call MQGETPARMS.
Numeric, output
Returns the WebSphere MQ completion code. This parameter can be used to determine whether an error occurred during the execution of this routine. If an error occurred, then the compCode parameter will be nonzero, and the reason parameter will be set to the appropriate reason code.
Numeric, output
Returns the WebSphere MQ reason code that qualifies the completion code.
Note: A reason code of -1 reflects a Base SAS internal error, not a WebSphere MQ error. To obtain a textual description of a failure (either Base SAS or WebSphere MQ), use the SYSMSG() Base SAS function call.
Details |
If data accompanies the message, it is retrieved into an internal Base SAS buffer. After the MQGET call completes, you should call MQGETPARMS to set Base SAS variables (parms) to that data or to retrieve the data into a physical binary or text file.
Example |
This example gets a message from a queue.
msglen=0; compCode=0; reason=0; CALL MQGET(hConn, hObj, hmd, hgmo, msglen, compCode, reason);
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.