MQOPEN
Establishes access to a WebSphere MQ object (queue,
process definition, or queue manager).
Syntax
CALL MQOPEN(hConn, hod, options, hObj, compCode, reason ,
compCode1, reason1, compCode2, reason2, ...>);
Required Arguments
- hConn
-
Numeric, input
Specifies the WebSphere
MQ connection handle that is obtained from a previous MQCONN function
call.
- hod
-
Numeric, input
Specifies the Base
SAS internal object descriptor handle that is obtained from a previous
MQOD function call.
- options
-
Character, input
Specifies a string
of open options, each separated by a comma. The following open options
are valid:
- INPUT_AS_Q_DEF
-
Open to get messages
using queue-defined default.
- INPUT_SHARED
-
Open to get messages
with shared access.
- INPUT_EXCLUSIVE
-
Open to get messages
with exclusive access.
- BROWSE
-
Open to browse messages.
- OUTPUT
-
Open to put messages.
- INQUIRE
-
Open to query object
attributes.
- SET
-
Open to set object
attributes.
- SAVE_ALL_CONTEXT
-
Save context when message
is received.
- PASS_IDENTITY_CONTEXT
-
Allow identity context
to be passed.
- PASS_ALL_CONTEXT
-
Allow all context to
be passed.
- SET_IDENTITY_CONTEXT
-
Allow identity context
to be set.
- SET_ALL_CONTEXT
-
Allow all context to
be set.
- ALTERNATE_USER_AUTHORITY
-
Validate with specified
user identifier.
- FAIL_IF_QUIESCING
-
Fail if QMgr is quiescing.
The following options
apply only when opening a cluster queue:
- BIND_AS_Q_DEF
-
Use default binding
for queue.
- BIND_NOT_FIXED
-
Do not bind to a specific
destination.
- BIND_ON_OPEN
-
Bind handle to destination
when queue is opened.
- hObj
-
Numeric, output
Returns the WebSphere
MQ handle that will be used in subsequent message queuing calls to
identify the object that is being accessed (a queue, a process definition,
or queue manager).
- compCode
-
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.
- reason
-
Numeric, output
Returns the WebSphere
MQ reason code that qualifies
compCode.
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.
- compCodex, reasonx
-
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.
Example
This example opens a
queue for input and output.
options="INPUT_SHARED,OUTPUT";
hObj=0;
compCode=0;
reason=0;
CALL MQOPEN(hConn, hod, options, hObj,
compCode,
reason);