1 #include <cmqc.h> /* MQ API header file */
4 #define NUMBEROFSELECTORS 2
6 const MQHCONN Hconn = MQHC_DEF_HCONN;
9 static void InquireGetAndPut(char *Message,
13 /* Declare local variables */
15 MQLONG SelectorCount = NUMBEROFSELECTORS;
16 /* Number of selectors */
17 MQLONG IntAttrCount = NUMBEROFSELECTORS;
18 /* Number of int attrs */
19 MQLONG CharAttrLength = 0;
20 /* Length of char attribute buffer */
22 /* Character attribute buffer */
23 MQLONG SelectorsTable[NUMBEROFSELECTORS];
24 /* attribute selectors */
25 MQLONG IntAttrsTable[NUMBEROFSELECTORS];
26 /* integer attributes */
27 MQLONG CompCode; /* Completion code */
28 MQLONG Reason; /* Qualifying reason */
30 /* Open the queue. If successful, do the inquire */
34 /* Initialize the variables for the inquire */
36 /* - Set SelectorsTable to the attributes whose */
39 /* - All other variables are already set */
41 SelectorsTable[0] = MQIA_INHIBIT_GET;
42 SelectorsTable[1] = MQIA_INHIBIT_PUT;
44 /* Issue the inquire call */
45 /* Test the output of the inquire call. If the */
46 /* call failed, display an error message */
47 /* showing the completion code and reason code,*/
48 /* otherwise display the status of the */
49 /* INHIBIT-GET and INHIBIT-PUT attributes */
61 if (CompCode != MQCC_OK)
63 sprintf(Message, MESSAGE_4_E,
64 ERROR_IN_MQINQ, CompCode, Reason);
69 /* Process the changes */
70 } /* end if CompCode */