Comment 1 for bug 684251

Revision history for this message
Dariusz Suchojad (dsuch) wrote :

If you have a look at the code I've pushed up to the branch, you'll notice a couple of changes regarding byte string, the end result is that the code returns the expected output, as seen below. Can you please confirm it's all OK for you as well?

import pymqi
from CMQC import *
from CMQCFC import *

cd = pymqi.cd()
cd.ChannelName = 'SVRCONN.1'
cd.ConnectionName = '127.0.0.1(1418)'

cd.ChannelType = MQCHT_CLNTCONN
cd.TransportType = MQXPT_TCP

qmgr = pymqi.QueueManager(None)
qmgr.connectWithOptions('QM01', opts=MQCNO_HANDLE_SHARE_NO_BLOCK, cd=cd)
pcf=pymqi.PCFExecute(qmgr)

conns=pcf.MQCMD_INQUIRE_CONNECTION(
    {MQBACF_GENERIC_CONNECTION_ID: pymqi.ByteString(''),
     MQIACF_CONNECTION_ATTRS:MQIACF_ALL,
     MQIACF_CONN_INFO_TYPE:MQIACF_CONN_INFO_CONN}
)

print(conns)

[{1024L: 2393L, 1025L: 1L, 1L: 7L, 1308L: 0L, 3501L: '', 3506L: '', 3025L: 'mqm ', 1108L: 1L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\x01', 7007L: 'AMQCQM01 A\xb6\xf7L\x01', 7009L: '', 3174L: 'WebSphere MQ Object Authority Manager', 1128L: 0L, 1132L: 0L, 3058L: 'amqzfuma ', 3060L: '', 3061L: '', 3062L: '', 3063L: '', 3064L: ''}, {1024L: 2422L, 1025L: 1L, 1L: 7L, 1308L: 0L, 3501L: '', 3506L: '', 3025L: 'mqm ', 1108L: 256L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\x01\x06', 7007L: 'AMQCQM01 A\xb6\xf7L\x01\x06', 7009L: '', 3174L: 'WebSphere MQ Deferred Message Processor', 1128L: 0L, 1132L: 0L, 3058L: 'amqzdmaa ', 3060L: '', 3061L: '', 3062L: '', 3063L: '', 3064L: ''}, {1024L: 2421L, 1025L: 1L, 1L: 7L, 1308L: 0L, 3501L: '', 3506L: '', 3025L: 'mqm ', 1108L: 256L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\x01\x07', 7007L: 'AMQCQM01 A\xb6\xf7L\x01\x07', 7009L: '', 3174L: 'WebSphere MQ Cluster Repository', 1128L: 1L, 1132L: 0L, 3058L: 'amqrrmfa ', 3060L: '2010-12-02 ', 3061L: '17.07.46', 3062L: '', 3063L: '', 3064L: ''}, {1024L: 2449L, 1025L: 1L, 1L: 7L, 1308L: 0L, 3501L: '', 3506L: '', 3025L: 'mqm ', 1108L: 256L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\x01\r', 7007L: 'AMQCQM01 A\xb6\xf7L\x01\r', 7009L: '', 3174L: 'WebSphere MQ Command Server', 1128L: 0L, 1132L: 0L, 3058L: 'amqpcsea ', 3060L: '', 3061L: '', 3062L: '', 3063L: '', 3064L: ''}, {1024L: 2448L, 1025L: 1L, 1L: 7L, 1308L: 0L, 3501L: '', 3506L: '', 3025L: 'mqm ', 1108L: 256L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\x01\x0e', 7007L: 'AMQCQM01 A\xb6\xf7L\x01\x0e', 7009L: '', 3174L: 'WebSphere MQ Channel Initiator', 1128L: 0L, 1132L: 0L, 3058L: 'runmqchi ', 3060L: '', 3061L: '', 3062L: '', 3063L: '', 3064L: ''}, {1024L: 2678L, 1025L: 70L, 1L: 25L, 1308L: 1L, 3501L: 'SVRCONN.1 ', 3506L: '127.0.0.1 ', 3025L: 'mqm ', 1108L: 320L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\t7', 7007L: 'AMQCQM01 A\xb6\xf7L\t7', 7009L: '', 3174L: '', 1128L: 0L, 1132L: 0L, 3058L: 'python', 3060L: '', 3061L: '', 3062L: '', 3063L: '', 3064L: ''}]