Previous Page | Next Page

WebSphere MQ Call Routines

MQPMO



Manipulates WebSphere MQ put message options to be used on a subsequent MQPUT call.
Syntax
Arguments
Example

Syntax

CALL MQPMO(hpmo, action, rc <,parms ,value1, value2, ...>);

Arguments

hpmo

Numeric, input or output

On input, it specifies the Base SAS internal put message options handle. The handle should be supplied when you are setting or querying an option. The handle is generated as output when action is to generate default WebSphere MQ put options.

action

Character, input

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

GEN

Generate a handle representing default put message options as defined by WebSphere MQ.

SET

After a put message options handle has been generated, you can continue to set values as necessary.

INQ

After a put message options 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 put message options that you want to set for subsequent MQPUT calls. Each option 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 the value for an option specified in the parms string. You must provide a value parameter for each option specified in the parms string and the data type must be of the proper type. Variables used to store character values that are being returned in an inquiry (INQ action) should be initialized appropriately to guarantee that truncation of a returned value does not occur.

The following put message options (parms) are valid:

CONTEXT

Numeric, input

Object handle of input queue.

RESOLVEDQNAME

Character48, output

Resolved name of destination queue.

RESOLVEDQMGRNAME

Character48, output

Resolved name of destination queue manager.

OPTIONS

Character, input

Character string of the attributes (options) to associate with subsequent MQPUT calls. Each option must be separated by a comma.

The following OPTIONS values are valid:

NONE

Default

SYNCPOINT

Put message inside current unit of work

NO_SYNCPOINT

Put message outside current unit of work

DEFAULT_CONTEXT

Associate default context with the message

PASS_IDENTITY_CONTEXT

Pass identity context from an input queue handle

PASS_ALL_CONTEXT

Pass all context from an input queue handle

SET_IDENTITY_CONTEXT

Set identity context from the application

SET_ALL_CONTEXT

Set all context from the application

ALTERNATE_USER_AUTHORITY

Validate with specified user identifier

FAIL_IF_QUIESCING

Fail if QMgr is quiescing

NO_CONTEXT

Associate no context with the message

The following OPTIONS values support WebSphere MQ Version 5.1 and later (these values are not supported on z/OS):

NEW_MSGID

Generate a new message identifier

NEW_CORRELID

Generate a new correlation identifier

LOGICAL_ORDER

Messages in groups and segments are put in logical order


Example

This example demonstrates the generate, set, and inquire actions of MQPMO routine.

length parms $ 30;
length rq rqmgr $ 48;
/* generate default put message options */
hpmo=0;
action="GEN";
rc=0;
CALL MQPMO(hpmo, action, rc);
/* set non-default put message options parameters */
action="SET";
parms="OPTIONS";
options="SYNCPOINT,FAIL_IF_QUIESCING";
CALL MQPMO(hpmo, action, rc, parms, options);
/* inquire about resolved names after successful PUT */
action="INQ";
parms="RESOLVEDQNAME,RESOLVEDQMGRNAME";
CALL MQPMO(hpmo, action, rc, parms, rq, rqmgr);

Previous Page | Next Page | Top of Page