HP3000-L Archives

June 2008, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Craig Lalley <[log in to unmask]>
Reply To:
Date:
Wed, 25 Jun 2008 09:01:02 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
--- 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 *

ATOM RSS1 RSS2