passing a variable in filePro to the OS (SCO v 6) for use with the "system" command
Brian K. White
brian at aljex.com
Sun Oct 10 20:19:05 PDT 2010
On 10/10/2010 9:30 PM, Fairlight wrote:
> 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?
My thought exactly but yes fp has putenv "VARNAME",fc
Yes, no (), even though getenv is fc = getenv("VARNAME")
--
bkw
More information about the Filepro-list
mailing list