Getting mqrc 2080 while trying to browse messages in DLQ - ibm-mq

I'm trying to browse messages in a DLQ and I get the 2080 error.
Please share your expertise on this issue.
1:root#hostname:/root # ./amqsbcg SYSTEM.DEAD.LETTER.QUEUE QM.ABCDEFG
AMQSBCG0 - starts here
**********************
MQOPEN - 'SYSTEM.DEAD.LETTER.QUEUE'
MQGET 1, failed with CompCode:1 Reason:2080
MQCLOSE
MQDISC1:root#hostname:/root # mqrc 2080
2080 0x00000820 MQRC_TRUNCATED_MSG_FAILED

Try the dmpmqmsg utility that comes with MQ V8 and above.
The following invocation as an example...
dmpmqmsg -m QM.ABCDEFG -i SYSTEM.DEAD.LETTER.QUEUE -f myfile.txt
This will give you a hex dump of the message after the MQMD is dumped out. amqsbcg would also only give you a hex dump of the message, so in both cases you are still going to have to pick your DLQ reason code out from the hex message.

amqsbcg is a sample MQ program that is included with MQ when you install the development tools. The source for amqsbcg (amqsbcg0.c) is located in the /opt/mqm/samp/ directory.
If you look at the source, you will see on line # 137:
#define BUFFERLENGTH 65536 /* Max length of message accepted */
Therefore, any message larger than 65536 bytes will cause MQ to return RC of 2080 (MQRC_TRUNCATED_MSG_FAILED) which your messages appear to be larger than 65536 bytes.
Therefore, you have some choices:
Take a copy of amqsbcg0.c, update it with a larger value,
compile & link it
Use the browse feature of MQ Explorer
Use a vendor tool like MQ Visual Edit to
view the Dead Letter Queue.

Related

z/OS ftp: 550 Unable to create data set E043156.UNIX.USERLIB.SOME for STOR command

I'm trying to upload a file from linux to z/OS via ftp (with filezilla). The upload fails with this error:
550-SVC99 RETURN CODE=4 S99INFO=0 S99ERROR=38668 HEX=970C S99ERSN code X'000042CE'.
550 Unable to create data set TESTUSER.UNIX.USERLIB.SOME for STOR command.
Does anyone know how to interpret this message?
SVC99, also known as DYNALLOC, is the dynamic allocation routine on z/OS. Documentation is voluminous, see the IBM Documentation for z/OS and look under z/OS MVS -> z/OS MVS Programming: Authorized Assembler Services -> Dynamic Allocation -> Requesting Dynamic Allocation Functions -> Interpreting Error Reason Codes from DYNALLOC. For z/OS 2.2 that path should take you here.
Meaning: Severe SMS VTOC service error.
Application programmer action:
Check field S99ERSN for a non-zero value. A non-zero value in S99ERSN
is a reason code. See SMS reason code (S99ERSN) for the possible
reason codes. If the system displayed message IKJ56893I, SMS messages
for the error follow IKJ56893I. If the system displayed message
IKJ56894I, no messages were returned. Request the message processing
option of dynamic allocation to obtain related messages and resubmit
the request. Because SMS creates entries in the logrec data set, if
you still cannot obtain messages, locate the logrec data set entry for
the error that corresponds to the reason code. If you need further
assistance contact your system programmer.
Corresponding Messages: IKJ56893I (messages were displayed) or
IKJ56894I (messages not displayed).
Following the link, your S99ERSN code is documented as...
42CE (17102)
Meaning: While trying to define a non-VSAM data set, a catalog error or
exceptional condition caused the allocation attempt to fail.
Application Programmer Action: Examine the return code and reason
code in accompanying message IGD17102I in z/OS MVS System Messages,
Vol 8 (IEF-IGD).
So there should be an accompanying message IGD17102I in the system log with even more information. Looking at the documentation, I'd contact your support staff as this doesn't look like something you can fix yourself.

Run MQSC Command via SYSTEM.ADMIN.COMMAND.EVENT

I have connected remotely to a QMgr via MQ Explorer on Windows. The MQ server version is 7.5.0.1. I can put messages in SYSTEM.ADMIN.COMMAND.EVENT from MQ Explorer successfully and when I dump SYSTEM.ADMIN.COMMAND.EVENT, I can see my messages. As long as I know, I should be able to run PCF commands and MQSC commands via this channel. So, I put DISPLAY QMGR ALL message inside this queue and I can successfully see this message on MQ Server. My question is how can I run this message remotely via this channel? Thanks.
IBM Doc indicates that I should be able to receive the command result in SYSTEM.MQSC.REPLY.QUEUE. But I can not browse this queue from client MQ Explorer. The queue type for this queue is Model.
Couple of problems here.
First, you are using the wrong queue. The command server listens on SYSTEM.ADMIN.COMMAND.QUEUE. The queue to which you are sending messages, SYSTEM.ADMIN.COMMAND.EVENT is the queue to which the QMgr puts event messages after executing commands, provided of course that command events are enabled.
The second problem, as Jason mentions, is that the runmqsc processor takes human-readable script and converts it into commands the QMgr can understand. Passing textual commands directly to the command server won't work.
Typically we do what you want by passing the commands to runmqsc directly such as...
echo DISPLAY QMGR ALL | runmqsc MYQMGRNAME
If you require the ability to do this as a client, then you want to either download SupportPac MO72, or head over to MQ Gem and pick up a copy of MQSCX. Either of these will accept the command above on a local queue manager, and both can also be supplied with MQ Channel params and connect to a remote QMgr.
In addition to this basic functionality, the MQSCX product also has its own internal script parsing and execution. Suppose, for instance, that you want to do something depending on the command level of the QMgr.
Using runmqsc you could issue the command above, filter the resulting 2-column output through grep, awk, or similar, then capture the final output into a variable. You might need to do this multiple times to capture multiple values, invoking a new runmqsc each time and parsing the output in your script. You must then generate the string for the actual command you wanted to run when you started all this, and pass it to another invocation of runmqsc.
Alternatively, MQSCX lets you issue the DISPLAY command, then reference the resulting values directly by name. For example, you can pass MQSCX a couple lines of script telling it to inquire on the QMgr and then take a conditional action based on the command version, all without ever having to drop back into shell, bat or Perl script.
Full disclosure, I do not work for or get a commission from MQ Gem. I just don't like to beat my head against the wall writing 100 lines of code where 2 will do. If you do any amount of MQSC scripting, the ROI on MQSCX is measured in minutes. And it happens to be 100% on-topic as an answer to this question.
The command server doesnt process textual messages, it processes PCF messages. You need to build a message in PCF format and it can be processed. See http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.adm.doc/q019980_.htm
Ideally you would use real PCF format but there is a PCF format where you can send MQSC commands ('escaped' PCF - see here http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.ref.adm.doc/q087230_.htm?lang=en)

issue while loading the messages in to MQ

issue facing while loading the messages in to mq channel, recieving an error like below pasted
MQOPEN ended with reason code 2001
unable to open queue for output
how can i resolve this above issue,kindly can any one please advice on the same
The return code resolves as follows:
C:\>mqrc 2001
2001 0x000007d1 MQRC_ALIAS_BASE_Q_TYPE_ERROR
The Infocenter page for this return code provides the following explanation:
2001 (07D1) (RC2001): MQRC_ALIAS_BASE_Q_TYPE_ERROR
Explanation
An MQOPEN or MQPUT1 call was issued specifying an alias queue as the destination, but the BaseQName in the alias queue definition resolves to a queue that is not a local queue, a local definition of a remote queue, or a cluster queue. Completion Code
*MQCC_FAILED Programmer response*
Correct the queue definitions.
In other words, the queue your app is opening is an alias queue. If you are opening for input and the base queue is not a local queue, this error results. If you are opening for output and the base queue is not a local queue, a local definition of a remote queue, or a cluster queue you also get this error.
What is not mentioned in the error code above is that if the alias queue points directly to a transmit queue you also get this error. In that case what you need is a QRemote and not an alias.

crtmqm give no response

I try to create a WebSphere queue manager in production env. Before this I manage to create the queue manager in the development env with no problem.
I'm using this script to create the queue manager:
crtmqm -u SYSTEM.DEAD.LETTER.QUEUE test1.qm
But it give no response (no error or success message).
When I try to start the queue manager (strmqm test1.qm) it give
"AMQ8118: WebSphere MQ queue manager does not exist."
Then I notice lots of strange thing that supposed not happen:
I can run the "crtmqm -u SYSTEM.DEAD.LETTER.QUEUE test1.qm" several times without any error
I can just type crtmqm and got no response
I can type crtmqm -y (which is not possible since there is no -y argument) and still no response
Can anyone tell me what is wrong?
If you are on UNIX, it may be that the OS kernel parameter requirements have not been met. Check the relevant WMQ Quick Beginnings manual for the platform.

MQ EOL Data conversion

we are sending data trough MQ from a z/OS/CICS system to an AS400.
Original encoding of the message is CCSID 500 with a MQSTR Format. The client application is getting the message with the CONVERT option and CCSID 819.
Data is almost converted correctly except for the end of line caracter. Any idea?
The z/OS is sending 0D (CR) as end of line caracter. If they had 0D+0A (CR+LF), CCSID automatically change from 500 to 437, and the end of line still ain't right on the client side.
Have already you tried only "0A" (LF)? Have you tried without an expliciet CONVERT? We've never had any issues with this part of the conversion and our machine talks with windows, AIX, Linux and so. Almost all the time we do rely on automatic conversions.
Also, you may want to check the USER of your job that picks the MQ message from the Queue. Most of the time the USER uses the system attributes (as defined in the appropriate SYSVAL). Maybe this userprofile has been configured very specific and different from the SYSVAL which stops the iSeries in doing the correct automatic conversion.
As a simple test, FTP your data to the iSeries. That will also force an automatic conversion that uses the system tables (WRKTBL). That may show an error in that configuration.
We had a problem with the CCSID of the queue manager not being set correctly and the wrong conversion table used.

Resources