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



Hi Scott -

Right as always. :) I had environment variable QIBM_QSH_CMD_ESCAPE_MSG
set to 'Y' at a job level from some earlier testing. The QSH0005 was
issued as a *COMP message once that environment variable wasn't in
effect. I could then RCVMSG the QSH0005 message and query the return
code in the MSGID - works fine.

But an interesting (to me) issue now. I'm using environment variable
QIBM_QSH_CMD_OUTPUT and setting it to *NONE to suppress the command
output. But when I do that, the RCVMSG picks up the CPCA980
(Environment variable added) *COMP message. I currently have a RCVMSG
coded right after the ADDENVVAR to pick up the CPCA980 message, and
another RCVMSG right after the QSH command to pick up the QSH0005
message. Is there a better practice? Perhaps I should have one RCVMSG
and loop until I find the QSH0005?

Thanks...

On Mon, Oct 27, 2008 at 2:42 PM, Scott Klement
<midrange-l@xxxxxxxxxxxxxxxx> wrote:
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 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.