passing a variable in filePro to the OS (SCO v 6) for use with the "system" command

Fairlight fairlite at fairlite.com
Sun Oct 10 18:30:18 PDT 2010


In the relative spacial/temporal region of
Sun, Oct 10, 2010 at 08:46:36PM -0400, Steve Parker achieved the spontaneous
generation of the following:
> 
> Now I need to send a value to SCO for use with the "tail" command. This will
> be executed through the filePro "system" command, but so far I have not
> figured out the correct syntax.
> 
> I thought the variable to use was @PM -- although it looks like there are
> several no -- but syntax help is sorely lacking. That is, unless I'm either
> on the wrong track or looking in the wrong place! LOL! Entirely possible!

Wrong direction.  The -r and -r[xwyz] flags are to pass data -into- @PM,
@P[WXYZ], not out.

> I want to send a numeric value from [FC(2,.0,g)] to Unix so I can execute a
> command that utilizes the value of FC.

Does fP have a SETENV() command?  If so, check and see if those values will
be accessible from SYSTEM() children.  If usual idioms were stuck to,
-children- of the current process should inherit such things.

If fP has no SETENV() at all, then I'd try something like:

cm="set VARNAME='val'; export VARNAME; tail [options]"
system cm

If all the commands go in -one- SYSTEM() call, they -should- all be
processed by the same interpreter, in the order given, and the children
(read: tail in this case) should have access to that interpreter's
environment.

Of course, if you're doing that methodology, why not just concatenate the
values in question into the command itself and skip any sort of environment
variable?

mark->
-- 
Audio panton, cogito singularis.


More information about the Filepro-list mailing list