Hi
Our MQ administrator changed the implementation to use a .TAB with all the parameters in but encrypted and the mqqcred.ini file and this has worked. Thank you all for your assistance with this. I was going crazy and needed some other thoughts to go forward.
Sent from Mail for Windows
Original Message:
Sent: 9/15/2021 11:35:00 AM
From: Christine Tod
Subject: RE: cobol with the mqconnx api passing a user name and password..
I thought the same thing but this is my first project with MQ and the answer I got was that it was expecting flexapp for that queue manger and I was passing spaces.
Will try to get a response to the second question..
Sent from Mail for Windows
Original Message:
Sent: 9/15/2021 3:24:00 AM
From: Morag Hughson
Subject: RE: cobol with the mqconnx api passing a user name and password..
Ok - I'll look forward to hearing the results and seeing more recent error messages.
It is very odd to hear that the user id 'flexapp' is the one that you are moving into the MQCSP block, since the error message you have shown us says:-
The call to initialize the User ID 'flexapp' failed with CompCode 2 and Reason 2035. If an MQCSP block was used, the User ID in the MQCSP block was ''. If a userID flow was used, the User ID in the UID header was '' ......
It is weird that the queue manager knows about the user id 'flexapp' and yet it did not learn about it through the MQCSP block. Is it possible that this user ID is also used somewhere else, for example in a CHLAUTH rule or hard-coded in an MCAUSER on the SVRCONN? You may need to ask your queue manager administrator this question.
Cheers,
Morag
------------------------------
Morag Hughson
MQ Technical Education Specialist
MQGem Software Limited
Website: https://www.mqgem.com
------------------------------
Original Message:
Sent: Wed September 15, 2021 03:17 AM
From: Christine Tod
Subject: cobol with the mqconnx api passing a user name and password..
I was given the user id of flexapp to use for MQ specifically. I have a different Linux user name.
I am moving this andt the password via the pointer to MQCSP..
Glad to know my pointers are correct as I have not used these before.
I will setup a new test with the MQ administrators and do displays of all data as I run.
Sent from Mail for Windows
Original Message:
Sent: 9/15/2021 3:10:00 AM
From: Morag Hughson
Subject: RE: cobol with the mqconnx api passing a user name and password..
You say, "Flexapp is the user name provided by IT(all lowercase)". Do you mean that it is the user ID you are putting into the MQCSP block, or do you mean that it is the user ID on your Linux box that is the MQ client in this situation, and under which you are running your MQ program, i.e. your Linux logon?
I would expect your pointer values might change every time you run your program even without recompiling it. The fact that they change is not a cause for concern.
Have you also checked the lengths are valid too?
You say, "I have been trying so many options with the same result," as a reason for showing us a 2 week old error message. Be aware that the reason code 2035 that the queue manager can return you, would happen for many different possibilities from the MQ application. It is possibly, and deliberately, the least helpful MQ Reason code there is, because the queue manager does not want to give a hacker any assistance in working out how he might manage to break in. It would be very useful to see an example of an error message from your most recent failure, since that would align with the code we are also looking at. Also, be aware, that there could be 3 or 4 related error messages one after the other for failures from user ID and password checking, so make sure your queue manager administrator gives you all of the pertinent information.
Cheers,
Morag
------------------------------
Morag Hughson
MQ Technical Education Specialist
MQGem Software Limited
Website: https://www.mqgem.com
Original Message:
Sent: Wed September 15, 2021 02:55 AM
From: Christine Tod
Subject: cobol with the mqconnx api passing a user name and password..
One thing that error message immediately shows is that the queue manager does not believe that it has received a user id in the MQCSP block. – this seems be be the issue
Is 'flexapp' the user ID under which you are running the application? Can we assume this is a client connected application since we can see it is Program(amqrmppa) in your error message?
I am connecting from a client on a Linux machine. Flexapp is the user name provided by IT(all lowercase).
Is this the most recent error you have for this problem? I ask because the date on the error message is over two weeks ago? I have been trying so many options with the same result..
While I am by no means a COBOL expert, the code you have shown looks correct from an MQ perspective, although I did wonder about this line:-
SET MQCNO-SECURITYPARMSPTR TO ADDRESS OF SECOPTIONS.
SECOPTIONS is the 01 level for the MSCP record layout..
* Connection options
01 CONNECTOPTS.
COPY CMQCNOV.CPY.
*************MQCNO
* Security Options
01 SECOPTIONS.
COPY CMQCSPV.CPY.
**********MQSP
since I couldn't see in the snippet you have supplied, what SECOPTIONS was? It is named plausibly to be the MQCSP block. These are displays of my pointers. They do change each time I recompile my programs.
You've said that you have displayed your pointers and they appear to be valid 32bit values. Is that also true of the MQCNO-SECURITYPARMSPTR. Have you also checked that the lengths look valid?
Sent from Mail for Windows
Original Message:
Sent: 9/15/2021 1:56:00 AM
From: Morag Hughson
Subject: RE: cobol with the mqconnx api passing a user name and password..
One thing that error message immediately shows is that the queue manager does not believe that it has received a user id in the MQCSP block.
Is 'flexapp' the user ID under which you are running the application? Can we assume this is a client connected application since we can see it is Program(amqrmppa) in your error message?
Is this the most recent error you have for this problem? I ask because the date on the error message is over two weeks ago?
While I am by no means a COBOL expert, the code you have shown looks correct from an MQ perspective, although I did wonder about this line:-
SET MQCNO-SECURITYPARMSPTR TO ADDRESS OF SECOPTIONS.
since I couldn't see in the snippet you have supplied, what SECOPTIONS was? It is named plausibly to be the MQCSP block.
You've said that you have displayed your pointers and they appear to be valid 32bit values. Is that also true of the MQCNO-SECURITYPARMSPTR. Have you also checked that the lengths look valid?
Cheers,
Morag
------------------------------
Morag Hughson
MQ Technical Education Specialist
MQGem Software Limited
Website: https://www.mqgem.com
Original Message:
Sent: Wed September 15, 2021 01:45 AM
From: Christine Tod
Subject: cobol with the mqconnx api passing a user name and password..
This is the error detail supplied by IBM admin user..
------------------------------
Christine Tod
Original Message:
Sent: Tue September 14, 2021 06:23 PM
From: Morag Hughson
Subject: cobol with the mqconnx api passing a user name and password..
You should probably show us a snippet of your code so we can help you find the problem. However, first guess, did you set the MQCSP_AUTH_USER_ID_AND_PWD flag in the MQCSP structure?
Also, you should probably show us what your error log has to say on the matter, AMQERR01.LOG on distributed platforms or the MSTR joblog on z/OS.
Cheers,
Morag
------------------------------
Morag Hughson
MQ Technical Education Specialist
MQGem Software Limited
Website: https://www.mqgem.com
Original Message:
Sent: Tue September 14, 2021 08:57 AM
From: Christine Tod
Subject: cobol with the mqconnx api passing a user name and password..
I am trying to connect to IBM MQ with the mqconnx api. Before the user id and password needed to be validated by MQ, it was working perfectly. I can see my pointers are being setup correctly but it still gives a 2035 error on connection..
I am using acucobol.
------------------------------
Christine Tod
------------------------------