Here's the REXX, panel to follow (n.b. change 1146 to your QM EBCDIC code page number as needed)
/* REXX TO RUN DMPMQMSG (QLOAD) ON QUEUE and ISPF browse result */
DMPOPTS = "-da -q -P1146 " /* HEX and TEXT in EBCDIC */
/* GET QMGR NAME (must be on this LPAR) and Queue name */
ADDRESS ISPEXEC "DISPLAY PANEL(MQPAN1)"
DO WHILE (RC=0)
CALL RUNQLOAD
ADDRESS ISPEXEC "DISPLAY PANEL(MQPAN1)"
END
EXIT 0
RUNQLOAD:
"ALLOC F(DMPMQ) SP(1 2) CYL NEW LR(100) BLK(9000) RECFM(V B) REUSE"
/* queue browsed not consumed due to -i lower case before QNAME */
PAR2 = "'/-m" || DMPQMGR "-i" || DMPQNAME
PAR2 = PAR2 "-FDD:DMPMQ" DMPOPTS "'"
/* ASIS option needed to stop folding to lower case */
"CALL 'SYS1.SCSQLOAD(QLOAD)'" PAR2 "ASIS"
IF RC > 4 THEN RETURN
/* Browse output with ISPF magic */
ADDRESS ISPEXEC "LMINIT DDNAME(DMPMQ) DATAID(DID)"
ADDRESS ISPEXEC "BROWSE DATAID("DID")"
"FREE F(DMPMQ)"
RETURN
------------------------------
Peter T
------------------------------
Original Message:
Sent: Mon May 08, 2023 08:10 AM
From: Judy Ellis
Subject: Help with QLOAD for IBM MQ
Hi Peter T.
Thank you, I'd like to see your REXX routine. Much appreciated.
Thank you,
Judy
------------------------------
Judy Ellis
------------------------------
Original Message:
Sent: Wed May 03, 2023 02:49 AM
From: Peter T
Subject: Help with QLOAD for IBM MQ
Readable depends how you are viewing the output.
Most QLOAD text options assume ASCII. However you need to read it in EBCDIC for sysout.
Just convert the message to EBCDIC using the QLOAD parameter -P500 (or choose another EBCDIC code page)
I had to work this out when coding a REXX to run QLOAD and display the output using ISPF browse. If you are interested in seeing this short REXX let me know.
------------------------------
Peter T