|
Scott's examples likely cover this - when you get a -1, that just
means an error occurred - when using Unix-style APIs. There is
another value you need to retrieve - an error number, errno - that
tells you exactly what the error was. It is a number - often and
maybe always in the 3000 range - you can get a text description of
the error a couple ways - there's a call to retrieve it - or put the
number after CPE to create a message ID. E.g., if the errno = 3025,
the message ID will be CPE3025.
The documentation for the API should have a whole list of the
reportable error numbers at the end - they have names like ENOENT
(that one is 3025) and the like - not the actual numbers - there is a
member in QSYSINC/H called ERRNO that has a list of them.
HTH
Vern
At 11:55 AM 8/14/2007, you wrote:
I'm trying to use RUNRMTCMD a bit more efficiently than I have in the
past. Basically I want to call a program on a workstation (embedded
NT) from the iSeries, and if the program doesn't exist, pass an error
back to the iSeries user. I know that the result of RUNRMTCMD is sent
back to a spooled file. I'm looking at the rexec() API which looks
like what I want. I don't seem to be able to get it to work - I'm
getting a -1 on the rexec() call. Anyone have working code and could
provide a sample? 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.
--
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-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.