MQSRO (Subscription Request Options) on IBM i
The MQSRO structure allows the application to specify options that control how a subscription request is made.
Overview
Purpose: The structure is an input/output parameter on the MQSUBRQ call.
Version: The current version of MQSRO is SRVER1.
Fields
The MQSRO structure contains the following fields; the fields are described in alphabetical order:
- SRNMP (10-digit signed integer)
-
This is an output field, returned to the application to indicate the number of publications sent to the subscription queue as a result of this call. Although this number of publications have been sent as a result of this call, there is no guarantee that this many messages will be available for the application to get, especially if they are non-persistent messages.
There may be more than one publication if the topic subscribed to, contained a wildcard. If no wildcards were present in the topic string when the subscription represented by HSUB was created, then at most one publication is sent as a result of this call.
- SROPT (10-digit signed integer)
-
One of the following options must be specified. Only one option can be specified.
Other options: The following option controls what happens when the queue manager is quiescing:- SRFIQ
-
The MQSUBRQ call fails if the queue manager is in the quiescing state.
Default option: If the option described previously is not required, the following option must be used:
- SRNONE
-
Use this value to indicate that no other options have been specified; all options assume their default values.
SRNONE helps program documentation. Although it is not intended that this option be used with any other, because its value is zero, this use cannot be detected.
- SRSID (4-byte character string)
-
This is the structure identifier; the value must be:
- SRSIDV
- Identifier for Subscription Request SROPT structure.
This is always an input field. The initial value of this field is SRSIDV.
- SRVER (10-digit signed integer)
-
This is the structure version number; the value must be:
- SRVER1
- Version-1 Subscription Request Options structure.
The following constant specifies the version number of the current version:
- SRVERC
- Current version of Subscription Request Options structure.
This is always an input field. The initial value of this field is SRVER1.
Initial values
Field name | Name of constant | Value of constant |
---|---|---|
SRSID | SRSIDV | 'SRO¬' |
SRVER | SRVER1 | 1 |
SROPT | SRNONE | 0 |
SRNMP | None | 0 |
Notes:
|
RPG declaration
D*..1....:....2....:....3....:....4....:....5....:....6....:....7.. D* MQSRO Structure D* D* Structure identifier D SRSID 1 4 D* Structure version number D SRVER 5 8I 0 D* Options that control the action of MQSUBRQ D SROPT 9 12I 0 D* Number of publications sent D SRNMP 13 16I 0Parent topic: Data type descriptions on IBM i