Previous Page | Next Page

WebSphere MQ Call Routines

MQSET



Changes the attributes of a queue object.
Syntax
Arguments
Example

Syntax

CALL MQSET(hConn, hObj, compCode, reason, parms, value1 <,value2, ...>);

Arguments

hConn

Numeric, input

Specifies the WebSphere MQ connection handle that is obtained from a previous MQCONN function call.

hObj

Numeric, input

Specifies the WebSphere MQ object handle that is obtained from a previous MQOPEN function call that specified the SET option. This handle represents a queue object.

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 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.  [cautionend]

parms

Character, input

Specifies a string of queue attributes that you want to set for a WebSphere MQ queue. Each queue attribute must be separated by a comma and must have a value associated with it. Only certain attributes (a subset of list for MQINQ) can be changed by using this function call. Refer to the IBM WebSphere MQ documentation for more details.

value

Numeric or character, input

Provides the value for an attribute that is specified in the parms string. You must provide a value parameter for each attribute that is specified in the parms string, and the data type must be of the proper type.


Example

This example changes the queue properties by inhibiting messages to be sent (put) to the queue.

length parms $ 30;
compCode=0;
reason=0;
parms="INHIBIT_PUT";
inhibit=1;
CALL MQSET(hConn, hObj, compCode,
reason, parms, inhibit);

Previous Page | Next Page | Top of Page