How to retrieve the connection details From TAB file - MQ

回眸只為那壹抹淺笑 提交于 2019-12-25 01:17:58

问题


Can someone please help me to get/read the port number, hostname, channel details when i using ccdt.tab file. these details were configured in tab file. queue creation was opened successfully by using tab file but i want to get above details (connection details) using java.

I can able to get only queue manager name and queue name by using MQQueueSender.getstringproperty(); but other not able to find.

I expect port number, hostname, channel which i defined in TAB file

    MQQueueConnection connection = null;
    MQQueueSession session = null;
    MQQueueSender sender = null;
    MQQueueReceiver receiver = null;
    HashMap<String, String> setValue = null;

    try {

        connection = getConnection(prop.getProperty("tabFilePath"));
        session = (MQQueueSession) connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
        MQQueue sendQueue = (MQQueue) session.createQueue(prop.getProperty("queueName"));
        sender = (MQQueueSender) session.createSender(sendQueue);   System.out.println(sender.getStringProperty("XMSC_WMQ_RESOLVED_QUEUE_MANAGER"));
        System.out.println(sender.getStringProperty("XMSC_WMQ_QUEUE_MANAGER"));

回答1:


There is no MQ API or Class that will parse a CCDT file for an MQ application.

Set the environment variables MQCHLLIB and MQCHLTAB to point to where your CCDT file located and then use runmqsc with the '-n' parameter to have MQ manage it then issue the following MQSC command:

DIS CHL(*) ALL

Now you will have all of the details of all CLNTCONN channels from the CCDT file.



来源:https://stackoverflow.com/questions/58662317/how-to-retrieve-the-connection-details-from-tab-file-mq

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!