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:
Reply To:
Date:
Wed, 25 Jun 2008 11:41:16 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
CREATPROCESS returns a result (STATUS) of the call itself, in other 
words "Did CREATEPROCESS succeed, and if not then why".  If 
CREATEPROCESS returns a bad status, then your C program never got a 
chance to fart around. It sounds like you want to retrieve a value from 
the process that was created, not just a value from the CREATEPROCESS 
intrinsic.

To do this; first you need to check to see if the C program (while 
farting around) sets a value in an environment variable about it's own 
success or failure.
{Run the C program stanalone from the command line, then issue the 
command showvar @ to see all environment variables and their values.

For example "FTP" when started as a child process using CREATPROCESS (or 
not) will always set some environment variables that contain information 
about the success or failure of itself. So after you call CREATEPROCESS, 
ACTIVATE wait for the process to finish, then call 
HPCIGETVAR(varname,status[,itemnum,item] [...]) with the name and data 
type of the variable you want to retrieve. If (while farting around) the 
C program does not set a variable, then you'll need to modify the C 
program to call HPCIPUTVAR(varname,status[,itemnum,item] [...]).

my $0.02, hope that helps, and welcome to the list.

-- 
Michael Anderson,
J3k Solutions
Sr.Systems Programmer/Analyst
832.515.3868

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2