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