Search code examples
javaibm-mqpcf

Why do I get an incorrect value for MQIACF_OBJECT_TYPE in Authority Record query response?


I have the following code for querying authority records from MQ.

PCFMessageAgent agent = new PCFMessageAgent(queueManager);
agent.setCheckResponses(false);
PCFMessage[] responses;
PCFMessage request = new PCFMessage(MQConstants.MQCMD_INQUIRE_AUTH_RECS);
request.addParameter(MQConstants.MQIACF_AUTH_OPTIONS,
MQConstants.MQAUTHOPT_NAME_ALL_MATCHING + MQConstants.MQAUTHOPT_ENTITY_EXPLICIT + MQConstants.MQAUTHOPT_NAME_AS_WILDCARD);
request.addParameter(MQConstants.MQCACF_AUTH_PROFILE_NAME, "*");
request.addParameter(MQConstants.MQIACF_OBJECT_TYPE, MQConstants.MQOT_ALL);
responses = agent.send(request);

When I process the response I get a value of 1017 for the parameter MQIACF_OBJECT_TYPE.
The documentation show only the following values for MQIACF_OBJECT_TYPE

MQOT_ALIAS_Q    1002
MQOT_ALL    1001
MQOT_AUTH_INFO  7
MQOT_CF_STRUC   10
MQOT_CHANNEL    6
MQOT_CLNTCONN_CHANNEL   1014
MQOT_CURRENT_CHANNEL    1011
MQOT_LOCAL_Q    1004
MQOT_MODEL_Q    1003
MQOT_NAMELIST   2
MQOT_PROCESS    3
MQOT_Q  1
MQOT_Q_MGR  5
MQOT_RECEIVER_CHANNEL   1010
MQOT_REMOTE_Q   1005
MQOT_REQUESTER_CHANNEL  1009
MQOT_RESERVED_1 999
MQOT_SAVED_CHANNEL  1012
MQOT_SENDER_CHANNEL 1007
MQOT_SERVER_CHANNEL 1008
MQOT_STORAGE_CLASS  4
MQOT_SVRCONN_CHANNEL    1013

Why am I getting a value 1017?
Could this be a combination of various other values?
If yes how do I know which ones?, because I can arrive at the number 1017 through several combination of the above values.


Solution

  • As per https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.ref.dev.doc/q092140_.htm

    1017 is MQOT_REMOTE_Q_MGR_NAME

    For completeness, here's the list of MQOT_ constants from a 9.0.0.0 installation

    #define MQOT_NONE                      0
    #define MQOT_Q                         1
    #define MQOT_NAMELIST                  2
    #define MQOT_PROCESS                   3
    #define MQOT_STORAGE_CLASS             4
    #define MQOT_Q_MGR                     5
    #define MQOT_CHANNEL                   6
    #define MQOT_AUTH_INFO                 7
    #define MQOT_TOPIC                     8
    #define MQOT_COMM_INFO                 9
    #define MQOT_CF_STRUC                  10
    #define MQOT_LISTENER                  11
    #define MQOT_SERVICE                   12
    #define MQOT_RESERVED_1                999
    #define MQOT_ALL                       1001
    #define MQOT_ALIAS_Q                   1002
    #define MQOT_MODEL_Q                   1003
    #define MQOT_LOCAL_Q                   1004
    #define MQOT_REMOTE_Q                  1005
    #define MQOT_SENDER_CHANNEL            1007
    #define MQOT_SERVER_CHANNEL            1008
    #define MQOT_REQUESTER_CHANNEL         1009
    #define MQOT_RECEIVER_CHANNEL          1010
    #define MQOT_CURRENT_CHANNEL           1011
    #define MQOT_SAVED_CHANNEL             1012
    #define MQOT_SVRCONN_CHANNEL           1013
    #define MQOT_CLNTCONN_CHANNEL          1014
    #define MQOT_SHORT_CHANNEL             1015
    #define MQOT_CHLAUTH                   1016
    #define MQOT_REMOTE_Q_MGR_NAME         1017
    #define MQOT_PROT_POLICY               1019
    #define MQOT_TT_CHANNEL                1020
    #define MQOT_AMQP_CHANNEL              1021
    #define MQOT_AUTH_REC                  1022