JVM COBOL calling java MQ classes

In Visual COBOL 2.1 for Eclipse, I'm trying to build a JVM application that I would want to deploy on z/Linux, so created a  COBOL JVM Class, coded the statement  $set ilusing"com.ibm.mq", add a JAR to the JVM Build Path in which package com.ibm.mq exists, then wrote the line of code  

set mqmanager to new MQQueueManager(qMgrName)  in a method within the class. I cannot get the compiler/builder to recognize MQQueueManager as a class that I can access. I get the error message "COBCH0845S Unknown class 'MQQueueManager' "

I added some ilusing statements for java.lang, and can quite happily access classes like Integer.

I'm very new to this environment including object COBOL, but I think I've set up everything I should to have my class invoke a java class.

So, what am I doing wrong.

 

 

Parents
  • I can get the following to compile without a problem in JVM COBOL on Windows by including the com.ibm.mq.jar in the build path.

        $set ilusing(com.ibm.mq)
          program-id. callMQ as "callMQ".
          data division.
          working-storage section.
          01 mqinstance type MQQueueManager.
          procedure division.

              set mqinstance to new type MQQueueManager("test")
              goback.

          end program callMQ.

Reply
  • I can get the following to compile without a problem in JVM COBOL on Windows by including the com.ibm.mq.jar in the build path.

        $set ilusing(com.ibm.mq)
          program-id. callMQ as "callMQ".
          data division.
          working-storage section.
          01 mqinstance type MQQueueManager.
          procedure division.

              set mqinstance to new type MQQueueManager("test")
              goback.

          end program callMQ.

Children
No Data