Previous Page | Next Page

WebSphere MQ Call Routines

MQOD



Manipulates object descriptor parameters to be used on a subsequent MQOPEN or MQPUT1 call.
Syntax
Arguments
Example

Syntax

CALL MQOD(hod, action, rc <,parms ,value1, value2, ...>);

Arguments

hod

Numeric, input or output

On input, it specifies a Base SAS internal object descriptor handle. The handle should be supplied when you are setting or querying a value. The handle is generated as output when action is to generate default object descriptor parameters.

action

Character, input

Specifies the desired action of this routine. The following action values are valid:

GEN

Generate a handle representing default object descriptor parameters as defined by WebSphere MQ.

SET

After an object descriptor handle has been generated, you can continue to set values as necessary.

INQ

After an object descriptor handle has been generated, you can query its values.

rc

Numeric, output

Provides the Base SAS return code from this function. If an error occurs, then the return code is nonzero. You can use the Base SAS function SYSMSG() to obtain a textual description of the return code.

parms

Character, input

Specifies an optional string of object descriptor parameters that you want to set for subsequent MQOPEN or MQPUT1 calls. Each parameter must be separated by a comma and must have a value associated with it in the function's parameter list.

value

Numeric or character, input or output

Provides a value for an object descriptor parameter specified in the parms string. You must provide a value parameter for each object descriptor parameter specified in the parms string and the data type must be of the proper type. Variables used to store character values being returned in an inquiry (INQ action) should be initialized appropriately to guarantee that truncation of a returned value does not occur.

For a list of the parameters that you can specify, see the documentation for the MQOD structure in the WebSphere MQ Application Programming Reference at www.ibm.com.


Example

This example generates an object descriptor to OPEN a temporary dynamic queue that begins with the name Base SAS and is unique within the system. The example then queries the name of the temporary dynamic queue that was created after a successful OPEN.

length qname $ 48;
hod=0;
action="GEN";
rc=0;
parms="OBJECTNAME,DYNAMICQNAME"
model="SAMPLE.TEMP.MODEL";
qname="SAS*";
CALL MQOD(hod, action, rc, parms, model, qname);
action="INQ";
parms="OBJECTNAME";
CALL MQOD(hod, action, rc, parms, qname);
put 'dynamic queue name = ' qname;

Previous Page | Next Page | Top of Page