title: Websphere MQ error 2018
body: <p>I am facing MQ error 2018, on connecting to the broker and havent really been able to figure out what the problem is </p>
  
  <p>It is an extremely simple code and this is how it works </p>
  
  <ol>
  <li>Connects to MQ</li>
  <li>Reads </li>
  <li>closed read queue</li>
  <li>Write</li>
  <li>Closed write queue </li>
  <li><p>Disconnects from quueu manager, and repeats the above process . </p>
  
  <p>try 
  {</p>
  
  <p>if(mqConnect()){
   mqRead()<br>
   queue.close()
  mqWrite()
  queue.close()
  mqdisconnect()
  } </p>
  
  <p>}
      finally 
      {
      if (mqQueueManager!= null)
                  {
                      mqDisconnect();
                  }</p></li>
  </ol>
  
  <p>Can someone suggest me what I am doing wrong please</p>