This looks like a dmpmqmsg defect, as well. The tool was reading a line that only had control characters (i.e. x0d0a) and treating it as a line of data (i.e. "Expected message attribute at line 4 of file"). That is not properly handling input data parsing, in my opinion.
Original Message:
Sent: Mon March 20, 2023 03:27 PM
From: JOAO MIGUEL RAMIRES
Subject: loading a queue with dmpmqmsg
Thanks! That was the problem! As it's a 300mb file I zipped it to move it more easily...
I did the ftp as ASCII and now the hex dump shows: "0a 0a" and load the file to a queue works correctly.
[mqm@osboxes ~]$ hexdump -C TRACEA_CTQ_15MAR.txt | more 00000000 2a 20 44 4d 50 4d 51 4d 53 47 20 56 65 72 73 69 |* DMPMQMSG Versi|00000010 6f 6e 3a 39 2e 31 2e 30 2e 31 30 20 43 72 65 61 |on:9.1.0.10 Crea|00000020 74 65 64 3a 57 65 64 20 4d 61 72 20 31 35 20 31 |ted:Wed Mar 15 1|00000030 36 3a 32 35 3a 34 31 20 32 30 32 33 0a 2a 20 51 |6:25:41 2023.* Q|00000040 6d 67 72 20 20 3d 20 51 4d 5f 4f 46 49 0a 2a 20 |mgr = QM_OFI.* |00000050 51 75 65 75 65 20 3d 20 53 59 53 54 45 4d 2e 41 |Queue = SYSTEM.A|00000060 44 4d 49 4e 2e 54 52 41 43 45 2e 41 43 54 49 56 |DMIN.TRACE.ACTIV|00000070 49 54 59 2e 51 55 45 55 45 0a 0a 41 20 56 45 52 |ITY.QUEUE..A VER|00000080 20 32 0a 41 20 52 50 54 20 30 0a 41 20 4d 53 54 | 2.A RPT 0.A MST|00000090 20 38 0a 41 20 45 58 50 20 2d 31 0a 41 20 46 44 | 8.A EXP -1.A FD|
------------------------------
JOAO MIGUEL RAMIRES
Original Message:
Sent: Mon March 20, 2023 03:06 PM
From: Morag Hughson
Subject: loading a queue with dmpmqmsg
It is certainly a supported behaviour to move these files from one platform to another. They are TEXT files so you do have to move them as text. It would appear that you might have moved this file as BINARY since the 0D0A Windows style line endings are present, rather than a single 0A as Linux would expect.
FTP the file as ASCII to your Fedora box and try again.
Cheers,
Morag
------------------------------
Morag Hughson
MQ Technical Education Specialist
MQGem Software Limited
Website: https://www.mqgem.com
Original Message:
Sent: Mon March 20, 2023 02:59 PM
From: JOAO MIGUEL RAMIRES
Subject: loading a queue with dmpmqmsg
Hi Morag!
The file looks ok... it was created in a Windows box MQ 9.1
On a different Windows box with MQ 9.0 I can load it to a queue, no problem there.
On a Fedora box with MQ 9.1 the load fails, here it goes the error and a few lines from the file
(is this a limitation, moving queue dump files between platforms?)
mqm@osboxes ~]$ /opt/mqm/bin/dmpmqmsg -oQ1 -mQMTEST -fTRACEA_CTQ_15MAR.txt 5724-H72 (C) Copyright IBM Corp. 1994, 2019.IBM MQ Queue Load/Unload UtilityExpected message attribute at line 4 of file 'TRACEA_CTQ_15MAR.txt'Read - Files: 1 Messages:0 Bytes:0Written - Files: 0 Messages:0 Bytes:0[mqm@osboxes ~]$ more TRACEA_CTQ_15MAR.txt* DMPMQMSG Version:9.1.0.10 Created:Wed Mar 15 16:25:41 2023* Qmgr = QM_OFI* Queue = SYSTEM.ADMIN.TRACE.ACTIVITY.QUEUEA VER 2A RPT 0A MST 8A EXP -1
and a HEX dum from the dum file
mqm@osboxes ~]$ hexdump -C TRACEA_CTQ_15MAR.txt |more 00000000 2a 20 44 4d 50 4d 51 4d 53 47 20 56 65 72 73 69 |* DMPMQMSG Versi|00000010 6f 6e 3a 39 2e 31 2e 30 2e 31 30 20 43 72 65 61 |on:9.1.0.10 Crea|00000020 74 65 64 3a 57 65 64 20 4d 61 72 20 31 35 20 31 |ted:Wed Mar 15 1|00000030 36 3a 32 35 3a 34 31 20 32 30 32 33 0d 0a 2a 20 |6:25:41 2023..* |00000040 51 6d 67 72 20 20 3d 20 51 4d 5f 4f 46 49 0d 0a |Qmgr = QM_OFI..|00000050 2a 20 51 75 65 75 65 20 3d 20 53 59 53 54 45 4d |* Queue = SYSTEM|00000060 2e 41 44 4d 49 4e 2e 54 52 41 43 45 2e 41 43 54 |.ADMIN.TRACE.ACT|00000070 49 56 49 54 59 2e 51 55 45 55 45 0d 0a 0d 0a 41 |IVITY.QUEUE....A|00000080 20 56 45 52 20 32 0d 0a 41 20 52 50 54 20 30 0d | VER 2..A RPT 0.|00000090 0a 41 20 4d 53 54 20 38 0d 0a 41 20 45 58 50 20 |.A MST 8..A EXP |000000a0 2d 31 0d 0a 41 20 46 44 42 20 30 0d 0a 41 20 45 |-1..A FDB 0..A E|000000b0 4e 43 20 35 34 36 0d 0a 41 20 43 43 53 20 38 35 |NC 546..A CCS 85|000000c0 30 0d 0a 41 20 46 4d 54 20 4d 51 41 44 4d 49 4e |0..A FMT MQADMIN|
------------------------------
JOAO MIGUEL RAMIRES
Original Message:
Sent: Mon March 20, 2023 01:37 PM
From: Morag Hughson
Subject: loading a queue with dmpmqmsg
Please can you show us the first (at least) 5 lines of the file so that we can see what it is complaining about. There may well be a way to fix it but without seeing it how can we know what is wrong.
Cheers,
Morag
------------------------------
Morag Hughson
MQ Technical Education Specialist
MQGem Software Limited
Website: https://www.mqgem.com
Original Message:
Sent: Fri March 17, 2023 09:11 AM
From: JOAO MIGUEL RAMIRES
Subject: loading a queue with dmpmqmsg
Hi all!
I've a text file with the dump of some messages, I don't remember which exact version of MQ it was created, but 9 something. Now I'm trying to load those messages in another Q, another box, MQ 9.2 using dmpmqmsg, and getting this:
[joao@xxxx ~]$ /opt/mqm/bin/dmpmqmsg -oQ1 -f filexxxx.txt -m QMxxx5724-H72 (C) Copyright IBM Corp. 1994, 2020.IBM MQ Queue Load/Unload UtilityExpected message attribute at line 4 of file 'filexxxx.txt.txt'Read - Files: 1 Messages:0 Bytes:0Written - Files: 0 Messages:0 Bytes:0Expected message attribute at line 4 of file
it's a know problem, caused by the options used when messages unload was done. Is there a way to fix this, maybe editing the text file?
Thanks!
Joao
------------------------------
JOAO MIGUEL RAMIRES
------------------------------