![]() |
![]() |
WebSphere MQ Call Routines |
Syntax | |
Arguments | |
Details | |
Example |
Syntax |
CALL MQPUT1(hConn, hod, hmd, hpmo, hData, compCode, reason <, compCode1, reason2, compCode2, reason2, ...>); |
Numeric, input
Specifies the WebSphere MQ connection handle that is obtained from a previous MQCONN function call.
Numeric, input
Specifies the Base SAS internal object descriptor handle that is obtained from a previous MQOD function 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 put message options handle that is obtained from a previous MQPMO function call.
Numeric, input
Specifies the Base SAS internal data descriptor handle that is obtained from a previous MQSETPARMS function call. If set to zero, then it is assumed that no data will accompany this message. For WebSphere MQ Version 5.1 and later, hData can also represent a reference message header that is obtained from a previous MQRMH function call.
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.
Numeric, output
The compCodex and reasonx are an optional series of paired values that can be used when opening a distribution list in order to discern failures for specific queues within the distribution list. These parameters support features of WebSphere MQ Version 5.1 and later.
Details |
Essentially, the MQPUT1 routine performs an MQOPEN, MQPUT and MQCLOSE in one API call. The queue does not have to be open before you make this call. Also note that the queue will be closed during the execution of this call.
Example |
This example sends a message to a queue that might not already be opened.
compCode=0; reason=0; CALL MQPUT1(hConn, hod, hmd, hpmo, hData, compCode, reason);
![]() |
![]() |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.