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



Thanks Vern...I was getting a -1 from the rexec() call, but the
errordesc was NULL, which gave me a 'host not found or bad
authentication' error.

Not necessarily. -1 just means "it failed" (and nothing more or less than that.) The API will set 'errno' (the Unix/C error number) to a number to indicate what went wrong. Most of the time, errno's value will tell you what went wrong.

The API DOES NOT SET errorDescriptor to NULL!! Whether errorDescriptor is null or not depends on the parameters you used when you called the API!

If errno=0 that means that it couldn't use errno to set the error. (The standard Unix/C errno does not have values for "host not found" or "bad password", so another means was needed.) In that situation, the API will try to set errorDescriptor to -1 to indicate "host not found". Or it will try to set it to a non-negative number to indicate that remote authorization failed (i.e. bad userid or password)

However, if your program had set errorDescriptor to NULL (the C equivalent of the *OMIT value used in RPG or CL, or OMITTED in COBOL) then the API doesn't have an errorDescriptor to set! In which case you won't know whether it's a "host not found" or whether it's "remote auth failed".

However, you can't even begin to look at errorDescriptor until AFTER you've determined that 'errno=0'. Otherwise, the value of errorDescriptor is meaningless.


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.