|
I need a nudge here. I wrote a stripped down program to issue a single
command in QSH. Then, I ran it in debug mode to see the variables. This does
not make sense at this point. First, the stripped down mimimal code:
0001.00 PGM
0002.00 DCL VAR(&Msgdta) type(*char) len(4)
0003.00 DCL VAR(&MSGID) TYPE(*CHAR) LEN(7)
0004.00 DCL VAR(&MSGTXT) TYPE(*CHAR) LEN(170)
0005.00 DCL VAR(&RETURNCODE) TYPE(*INT) LEN(4)
0006.00 DCL VAR(&RC) TYPE(*CHAR) LEN(5)
0007.00
0008.00 QSH CMD('ls')
0009.00 MONMSG MSGID(QSH0005) EXEC(DO)
0010.00 RCVMSG MSGTYPE(*COMP) RMV(*YES) +
0011.00 MSGDTA(&MSGDTA) +
0012.00 MSGID(&MSGID)
0013.00 CHGVAR VAR(&RETURNCODE) +
0014.00 VALUE(%BIN(&MSGDTA 1 4))
0015.00 CHGVAR VAR(&RC) VALUE(&RETURNCODE)
0016.00 ENDDO
0017.00 CHGVAR VAR(&MSGTXT) VALUE('RETURN CODE IS' *BCAT &RC)
0018.00 SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSGTXT) +
0019.00 TOMSGQ(MISC003)
0020.00 END:
0021.00 DMPCLPGM
0022.00 ENDPGM
Running in debug with breakpoint set on the DMPCLPGM command, I get this:
EVAL &msgdta:x
00000 40404040
EVAL &msgid:x
00000 40404040 404040.. ........ ....
EVAL &msgtxt:x
00000 D9C5E3E4 D9D540C3 D6C4C540 C9E24040 - RETURN CODE IS
00010 40404040 40404040 40404040 40404040 -
I am left wondering if something is removing the message, thus preventing this
little program from seeing it.
I have not done debug on a batch job in a long
time. So, I was doing this interactively.
If I type the QSH command on a
command line, I do see the QSH0005 message on the bottom of the screen. But,
it does not seem to be here in this program.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.