WebSphere MQ Call Routines |
Syntax | |
Arguments | |
Example |
Syntax |
CALL MQGMO(hgmo, action, rc <,parms ,value1,value2, ...>); |
Numeric, input or output
On input, it specifies a Base SAS internal get 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 get options.
Character, input
Specifies the desired action of this routine. The following action values are valid:
Generate a handle representing default get message options as defined by WebSphere MQ.
After a get message options handle has been generated, you can continue to set values as necessary.
After a get 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 get message options that you want to set for subsequent MQGET 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 a get message 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 being returned in an inquiry (INQ action) should be initialized appropriately to guarantee that truncation of a returned value does not occur.
The following get message options (parms) and values are valid:
Character, input
Specifies a string of the attributes (options) to associate with subsequent MQGET calls. Each option must be separated by a comma.
The following OPTIONS values are valid:
Used to unset previously set OPTIONS
Return immediately if no suitable message
Wait for message to arrive
Get message with synchpoint control
Get message without synchpoint control
Browse from start of queue
Browse from current position in queue
Get message under browse cursor
Lock message
This option is not supported on z/OS.
Unlock message
This option is not supported on z/OS.
Browse message under browse cursor
This option is not supported on z/OS.
Fail if QMgr is quiescing
Convert message data
The following OPTIONS values support WebSphere MQ Version 5.1 and later (these values are not supported on z/OS):
Messages in groups and segments of logical messages are returned in logical order.
Only complete logical messages are retrievable.
All messages in a group must be available.
All segments in a logical message must be available.
Notes:
ACCEPT_TRUNCATED_MSG is not allowed since Base SAS internally maintains resizing of the internal GET buffer to handle any message size.
Specify CONVERT to allow WebSphere MQ to perform data conversion based on the FORMAT of a PUT message via a conversion exit routine that has been previously established at the QMgr. To allow Base SAS to perform the data conversion instead of using a WebSphere MQ conversion exit routine, do not specify the CONVERT option.
Numeric, input
Amount of time to wait for message to arrive in milliseconds.
Character48, output
Resolved name of destination queue.
Character36, input
A value equal to the environment variable of the same name, a 36-character string. The environment variable can be retrieved using the following in a SAS DATA step:
sid = sysget('SASQSID');For queues that are monitored by the object spawner, the MsgDeliverySequence property must be set to Priority. For more information about this option, see Using Message Queue Polling with WebSphere MQ.
The following get message options are supported by WebSphere MQ Version 5.1 and later:
Character, input
Character string of match options that is used to control selection criteria that are associated with subsequent MQGET calls. Each option must be separated by a comma. The following MATCHOPTIONS values are valid:
No matches
Retrieve message with specified message identifier
Retrieve message with specified correlation identifier
Retrieve message with specified group identifier
This option is not supported on z/OS.
Retrieve message with specified sequence number
This option is not supported on z/OS.
Retrieve message with specified offset
This option is not supported on z/OS.
Character, output
Flag indicating whether message was retrieved within a group
Character, output
Flag indicating whether message was retrieved within a segment of a logical message
Character, output
Flag indicating whether further segmentation is allowed for the retrieved message
Example |
This example generates get message options to wait 3 seconds for a GET message operation.
hgmo=0; action="GEN"; rc=0; parms="OPTIONS,WAITINTERVAL"; options="WAIT"; interval=3000; CALL MQGMO(hgmo, action, rc, parms, options, interval);
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.