Merge branch 'master' of congo:dev/ohcount
[ohcount] / test / expected_dir / c1.c
1 c       code    #include <cmqc.h>      /* MQ API header file       */
2 c       comment //
3 c       blank   
4 c       code    #define NUMBEROFSELECTORS  2
5 c       blank   
6 c       code    const MQHCONN Hconn = MQHC_DEF_HCONN;
7 c       blank   
8 c       blank   
9 c       code    static void InquireGetAndPut(char   *Message,
10 c       code                    PMQHOBJ pHobj,
11 c       code                    char   *Object)
12 c       code    {
13 c       comment         /*      Declare local variables                       */
14 c       comment         /*                                                    */
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    */
29 c       comment         /*                                                    */
30 c       comment         /*     Open the queue.  If successful, do the inquire */
31 c       comment         /*     call.                                          */
32 c       comment         /*                                                    */
33 c       comment         /*                                                 */
34 c       comment         /*   Initialize the variables for the inquire      */
35 c       comment         /*   call:                                         */
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        */
40 c       comment         /*                                                 */
41 c       code            SelectorsTable[0] = MQIA_INHIBIT_GET;
42 c       code            SelectorsTable[1] = MQIA_INHIBIT_PUT;
43 c       comment         /*                                                 */
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      */
50 c       comment         /*                                                 */
51 c       code            MQINQ(Hconn,
52 c       code                            *pHobj,
53 c       code                            SelectorCount,
54 c       code                            SelectorsTable,
55 c       code                            IntAttrCount,
56 c       code                            IntAttrsTable,
57 c       code                            CharAttrLength,
58 c       code                            CharAttrs,
59 c       code                            &CompCode,
60 c       code                            &Reason);
61 c       code            if (CompCode != MQCC_OK)
62 c       code            {
63 c       code                    sprintf(Message, MESSAGE_4_E,
64 c       code                                    ERROR_IN_MQINQ, CompCode, Reason);
65 c       code                    SetMsg(Message);
66 c       code            }
67 c       code            else
68 c       code            {
69 c       comment                 /* Process the changes */
70 c       code            } /* end if CompCode */