--- On Wed, 6/25/08, Daniel Griffin <[log in to unmask]> wrote:
CREATEPROCESS to run a C program that farts around for a few minutes
then returns either a 0 or a 15, how do I determine which return code is
returned? I originally thought I could get this info from PROCINFO or
GETPROCINFO, but havent found anything.
Daniel,
I am only a C hacker, I mostly write in COBOL.
But the trick is to check createstatus, RIGHT after you call CREATEPROCESS.
Here is an example, I am sure Walter could do better or Stan and Keven can show you C examples.
CALL INTRINSIC 'CREATEPROCESS' USING W-CREATE-STAT,
W-PIN, W-PROG-TO-CALL, CREATEPROC-ITEMNUMS,
CREATEPROC-ITEMVALS.
IF CC < 0
DISPLAY 'CNLBLPRT: create of CUSTPRNT failed. '
'CREATE STATUS=' W-CREATE-STAT
ELSE
IF CC > 0
DISPLAY 'CNLBLPRT: create of CUSTPRNT succeeded '
'with warning ' W-CREATE-STAT
ELSE
DISPLAY 'CNLBLPRT: create of CUSTPRNT succeeded '.
Hope that helps,
-Craig
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|