PCF comand to set authorities

Asked by Ralf Henschkowski

Hello,

I try to issue a PCF command that changes permissions on a queue object (or any other object).
This is the code:

import pymqi
from pymqi import CMQC, CMQCFC
from CMQCFC import *
from CMQC import *

qmgr=pymqi.connect("MQ7LINUX")
pcf = pymqi.PCFExecute(qmgr)

try:
    response = pcf.MQCMD_SET_AUTH_REC({
        MQCACF_AUTH_PROFILE_NAME: 'RALF*',
        MQIACF_OBJECT_TYPE: MQOT_Q,
        MQIACF_AUTH_ADD_AUTHS: MQAUTH_BROWSE,
        MQCACF_GROUP_ENTITY_NAMES:'mqm'
        })
except pymqi.MQMIError, e:
    raise
else:
    pprint(response, width=20)
qmgr.disconnect()

The code throws an exception when run:

Traceback (most recent call last):
  File "auth_pcf.py", line 24, in <module>
    MQCACF_GROUP_ENTITY_NAMES:'mqm'
  File "/home/tj16/lib64/python2.6/site-packages/pymqi.py", line 2076, in __call__
    raise MQMIError(rv[-2], rv[-1])
pymqi.MQMIError: MQI Error. Comp: 2, Reason 3014: FAILED: MQRCCF_CFIN_PARM_ID_ERROR

Could you please help me? I read the documentation regarding the PCF commands (ftp://ftp.software.ibm.com/software/integration/wmq/docs/V7.0/csqzac07.pdf).

The queue manager is version 7.0.1.7 on the same box as the client. Other MQI or PCF calls succeed.

Thanks.

Regards,
Ralf

Question information

Language:
English Edit question
Status:
Solved
For:
PyMQI Edit question
Assignee:
No assignee Edit question
Solved by:
Ralf Henschkowski
Solved:
Last query:
Last reply:
Revision history for this message
Ralf Henschkowski (ralf-henschkowski) said :
#1

Found this MQ bug: http://www-01.ibm.com/support/docview.wss?uid=swg1IY99593
But changing the order in the parameter dictionary to pcf.MQCMD_SET_AUTH_REC() did not change anything.

Revision history for this message
Dariusz Suchojad (dsuch) said :
#2

Hi Ralf,

I'm on it right now. Will keep you posted if I find anything. In the meantime, can you please tell me which PyMQI it is?

Cheers!

Revision history for this message
Dariusz Suchojad (dsuch) said :
#3

Ralf,

it turns out I can't do much about it without IBM's support. PyMQI uses MQAI for executing PCF commands and everything looks just fine PyMQI end.

I've also created a sample C program based on amqsaicq.c by IBM and am seeing the same MQRCCF_CFIN_PARM_ID_ERROR exception. See the q209225.c attachment, you can compile it and then run using the commands:

$ gcc -o q209225.o -c q209225.c
$ gcc -o q209225 q209225.o -L/opt/mqm/lib64 -lmqm_r
$ ./q209225 QM_NAME

Can you please send it across to IBM in a PMR saying it's a sample MQAI program following the spec and that you're having troubles understanding why it doesn't work? Otherwise, I can't really do anything, everything looks just fine Python side.

Cheers!

Revision history for this message
Dariusz Suchojad (dsuch) said :
#4

Hm, it seems I can't add attachments to Launchpad questions.. can you please use this gist instead?

https://gist.github.com/3762240

Revision history for this message
Ralf Henschkowski (ralf-henschkowski) said :
#5

Hi Dariusz,

Thanks for your thoughts and work, I appreciate it!
I will forward that to IBM somehow.

Best regards
Ralf