× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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...


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.