Passing data between filepro tasks

Del del at altsystem.com
Sun Jun 19 05:52:14 PDT 2011


I did think of that, but for various reasons I can't call the other pgms, 
have to use the system command.
Thanks for trying though.
I have already created a little parameter file and have successfully passed 
data back and forth, which works fine and is transparent to the user.
I think it was more of an aesthetic thing than a technical one - wanted a 
more elegant solution.
Or maybe just lazy?  Path of least resistance?

Del

-----Original Message----- 
From: Richard Kreiss
Sent: Saturday, June 18, 2011 3:45 PM
To: 'Kenneth Brody' ; 'Jay Ashworth'
Cc: filepro-list at lists.celestial.com
Subject: RE: Passing data between filepro tasks

TOP Post:

Ken,

I did what you often ask, did I try it and what happened.

I tried this test:

>From input process @keyT

       ◄ If:
       Then: putenv "richard","susan"
177  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: CALL "answer"
178  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: MSGBOX "The answer is \r"<getenv,("richard")

Answer.prc

1  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:
      Then: qq=getenv("richard")
2  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:
      Then: putenv "richard","Ling Ling"
3  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:
      Then: END

When the program returns, the "Richard" is now Ling Ling.

So, this will work with a called program.

This then begs the question, can Del duplicate whatever the output program 
is in the other file as a called program in the current file?

Yes, it is simpler to pass the value to another file and the grab it on 
return, but this is another approach.

Richard



> -----Original Message-----
> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
> Behalf Of Kenneth Brody
> Sent: Friday, June 17, 2011 5:29 PM
> To: Jay Ashworth
> Cc: filepro-list at lists.celestial.com
> Subject: Re: Passing data between filepro tasks
>
> 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.
>
> You haven't been able to make changes to the parent's environment since
> real-mode MS-DOS days.  (And even then, only by some undocumented,
> version-specific hacks.)
>
> And, AFAIK, Windows processes haven't shared memory space since 16-bit
> days.
>
> I can guarantee that PUTENV would never have affected the parent process'
> environment, as even under real-mode MS-DOS, each process got a copy of
> the parent's environment.
>
> The only thing that can be passed back to the parent through something
> other than things like an external file or IPC, is an exit value.
>
> --
> Kenneth Brody
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list

_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes
http://mailman.celestial.com/mailman/listinfo/filepro-list 





More information about the Filepro-list mailing list