The Queue Attributes sample

 

The Queue Attributes sample is a conversational-mode CICS application that demonstrates the use of the MQINQ and MQSET calls. It shows how to inquire about the values of the InhibitPut and InhibitGet attributes of queues, and how to change them so that programs cannot put messages on, or get messages from, a queue. You might want to lock a queue in this way when you are testing a program.

To prevent accidental interference with your own queues, this sample works only on a queue object that has the characters CSQ4SAMP in the first eight bytes of its name. However, the source code includes comments to show you how to remove this restriction.

Source programs are supplied in the COBOL, assembler, and C languages (see Table 2).

The assembler-language version of the sample uses reenterable code. To do this, you will notice that the code for each MQI call in that version of the sample includes the MF keyword; for example:

     CALL MQCONN,(NAME,HCONN,COMPCODE,REASON),MF=(E,PARMAREA),VL
(The VL keyword means that we can use the CICS Execution Diagnostic Facility (CEDF) supplied transaction for debugging the program.) For more information on writing reenterable programs, see Writing reenterable programs.

To start the application, start your CICS system and use the following CICS transactions:

We can change the name of any of these transactions by changing the CSD data set mentioned in step 3.

 

Parent topic:

Sample programs for WebSphere MQ for z/OS


fg18380_