![]() |
![]() |
WebSphere MQ Call Routines |
Syntax | |
Arguments | |
Example |
Syntax |
CALL MQPMO(hpmo, action, rc <,parms ,value1, value2, ...>); |
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.
Character, input
Specifies the desired action of this routine. The following action values are valid:
Generate a handle representing default put message options as defined by WebSphere MQ.
After a put message options handle has been generated, you can continue to set values as necessary.
After a put message options handle has been generated, you can query its values.
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.
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.
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:
Numeric, input
Object handle of input queue.
Character48, output
Resolved name of destination queue.
Character48, output
Resolved name of destination queue manager.
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:
Default
Put message inside current unit of work
Put message outside current unit of work
Associate default context with the message
Pass identity context from an input queue handle
Pass all context from an input queue handle
Set identity context from the application
Set all context from the application
Validate with specified user identifier
Fail if QMgr is quiescing
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):
Generate a new message identifier
Generate a new correlation identifier
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);
![]() |
![]() |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.