Passing data between filepro tasks

Brian K. White brian at aljex.com
Fri Jun 17 12:11:36 PDT 2011


On 6/17/2011 2:04 PM, Jay Ashworth wrote:
> ----- Original Message -----
>> From: "Del"<del at altsystem.com>
>
>> In the Windows environment (which I seldom work in), I am writing a
>> filepro program that executes other existing pgms using the ‘system
>> “dclerk etc, etc”’ command. This works great, and I can pass values
>> from the “mother” task to the “daughter” tasks using the flags –rw,
>> –rx, –ry. My question is, what is the best way to pass values back
>> from the “daughter” to the “mother”? I can think of a couple of clumsy
>> ways, don’t know of a really nifty one. Don’t really want to create a
>> file to do this, but will if I have to.
>
> You *may* be able to use SETENV and GETENV for this: in Windows, processes
> all live in the same process space, unlike Unix, where the parent can't see
> changes made in child processes... but you'd have to test this, as I never
> have.  Your code is *guaranteed* not to be portable to Unix if you do this,
> though, so keep that in mind.
>
> Cheers,
> -- jra

Similarly, on unix you can write and read to/from a named pipe but not 
on windows.

I'd just go ahead and use the file. It's not _that_ bad in terms of 
programming work especially once you do it a few times. And the OS and 
hardware will mostly magic-away the inefficiency of creating, writing, 
reading, deleting a file thanks to caching. And it'll work the same 
everywhere. And if the processes are both filepro, and both in the same 
filepro directory, then it's even simpler since the intermediary file 
can be a filepro file and you're using lookups instead of raw file i/o 
commands.

-- 
bkw


More information about the Filepro-list mailing list