|
By default, QSH0005 is sent as a *COMP (completion) message. Therefore,
it should not cause the program to blow up, and this code should work
correctly.
However, there's an envvar you can set that tells QSH to use *ESCAPE
messages instead of *COMP messages. If you have that variable set up to
send escape messages,then I agree with your assessment.
But, I suspect the code you posted is intended for the default state
where the message is sent as a *COMP -- especially considering the
RCVMSG specifically asks for a *COMP message :)
Michael Ryan wrote:
Give this snippet of IBM code (to get a return code from batch sFTP),
how would the RCVMSG ever get hit?
QSH CMD(&CM3)
RCVMSG MSGTYPE(*COMP) RMV(*NO) MSGDTA(&MSGDTA) MSGID(&MSGID)
IF (&MSGID *EQ 'QSH0005')
CHGVAR &RC %BIN(&MSGDTA)
DMPCLPGM /* Dump will show RC as 0 (success) or 1 (fail) */
ENDPGM
If QSH0005 isn't monitored (and occurs), the CL program would blow up
after the QSH and before the RCVMSG, right? Is this code just
incomplete or am I not seeing something? The whole code is at
http://www-912.ibm.com/s_dir/slkbase.nsf/1ac66549a21402188625680b0002037e/5927fada0fed9591862573ba0055501a?OpenDocument&Highlight=2,sftp
Thanks...
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.