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




On Thu, 4 Sep 2003, Joel Cochran wrote:
>
> Is there anything I can do with the Exit Code?  Is this where I need to
> use your WIF* procedures?  The ones listed here:
> http://archive.midrange.com/rpg400-l/200204/msg00176.html
>

You can use WIFEXITED() to determine if the program exited (rather than
being stopped by some other means)

If it did exit, you can use WEXITSTATUS() to get the exit status.   The
documentation for the command that you're running may help you here.
It may something like (this is just an example):
       program exits with 1 if file not found, with 2 if another error
       occurred.

In which case, you can check the exit status to see what happened.
So far, I haven't found IBM's manuals to be that verbose about the exit
status.   Take the manual page for rm for example:

http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzahz/rm.htm

See, under "Exit Status" it basically just says "0 if everything was
deleted or >0 if an error occurs"

So, that's what the exit status is...   not sure how helpful that is.
Generally, I just check the return code of QzshSystem() for <0 to see
if the API errored out (very rare), 0 for success, or >0 for the command
errored out.

If more detail than that is required, I skip using QShell and write my
own routines using the IFS API :)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.