Is there any way in Classic Rexx (Quercus Personal Rexx) to pass a
stem variable to an external Rexx subroutine and have the subroutine
assign its own name?
I have written a fairly complicated curve-fitting routine for a
project. The data points are in a stem variable (x1.i, i=1 to n). The
result is in another stem variable (x2.i).
It is currently an internal subroutine. The stem variables are exposed
to the subroutine.
Now I would like to make it into a general-purpose external subroutine
that any other Rexx exec call call.
I tried GlobalV and had some success, but I think the caller and the
subroutine must use the same stemname. Is there a way using GlobalV
for the subroutine to use one name and map it to a diffrerent name in
the calling routine?
Does anyone know where I can find a reference manual for GlobalV?
My other solution is to convert the stem variable to a string, pass
the string to the subroutine, have the subroutine pass another string
back, which the caller then converts into a stem variable. (Ugh).
|
|
0
|
|
|
|
Reply
|
Three
|
1/19/2009 8:19:57 AM |
|
> Is there any way in Classic Rexx (Quercus Personal Rexx) to pass a
> stem variable to an external Rexx subroutine and have the subroutine
> assign its own name?
Sure, use a global REXXSAA API RxVariablePool at both ends.
---
|
|
0
|
|
|
|
Reply
|
spamgate
|
1/19/2009 6:57:53 PM
|
|
Three Lefts wrote:
> Is there any way in Classic Rexx (Quercus Personal Rexx) to pass a
> stem variable to an external Rexx subroutine and have the subroutine
> assign its own name?
>
> I have written a fairly complicated curve-fitting routine for a
> project. The data points are in a stem variable (x1.i, i=1 to n). The
> result is in another stem variable (x2.i).
>
> It is currently an internal subroutine. The stem variables are exposed
> to the subroutine.
>
> Now I would like to make it into a general-purpose external subroutine
> that any other Rexx exec call call.
>
> I tried GlobalV and had some success, but I think the caller and the
> subroutine must use the same stemname. Is there a way using GlobalV
> for the subroutine to use one name and map it to a diffrerent name in
> the calling routine?
>
> Does anyone know where I can find a reference manual for GlobalV?
>
> My other solution is to convert the stem variable to a string, pass
> the string to the subroutine, have the subroutine pass another string
> back, which the caller then converts into a stem variable. (Ugh).
Two things to think about. First, write it to a file, then read it back.
Second, put it on the stack, then pull it off again.
For a simple stem, you only need to output the values and read them
back. For a more complex stem you need to output the structure too, then
interpret it when input.
|
|
0
|
|
|
|
Reply
|
Graham
|
1/21/2009 2:16:37 AM
|
|
Graham wrote:
> Two things to think about. First, write it to a file, then read it back.
> Second, put it on the stack, then pull it off again.
One warning about the stack. I found it to be slower than disk I/O,
despite the fact that it is surely implemented entirely in memory.
I never did figure out why, but files were easier for me anyway. I was
wary of using something like the stack in a multi-threaded environment,
but it was all so long ago, I forget the exact conditions.
--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
|
|
0
|
|
|
|
Reply
|
Swifty
|
1/22/2009 6:23:55 PM
|
|
On 22 Jan., 19:23, Swifty <steve.j.sw...@gmail.com> wrote:
If you say you have used GLOBALV than it seems to me you are on a host
system (VM/CMS)
If yes, than you should use Pipe.
If you want to get the Stem: TEST. just define in the routine that is
called
"PIPE (SEP !) STEM TEST. 1 ! STEM TEST.'
Than the whole stem TEST. is loaded.
If you change any of TEST. than you need to pass the stem back to the
calling routine
"PIPE (SEP !) STEM TEST. ! STEM TEST. 1"
IF the stem is hugh and you need just a few values of the stem for
example TEST.3 and TEST.XXX than you can use this
"PIPE (SEP !) VAR STEM.3 1 ! VAR STEM.3"
"PIPE (SEP !) VAR STEM.XXX 1 ! VAR STEM.XXX"
.... Martin
|
|
0
|
|
|
|
Reply
|
mberg
|
2/4/2009 8:26:42 AM
|
|
in 3124 20090204 082642 mberg <mberg@de.ibm.com> wrote:
>On 22 Jan., 19:23, Swifty <steve.j.sw...@gmail.com> wrote:
>If you say you have used GLOBALV than it seems to me you are on a host
>system (VM/CMS)
>If yes, than you should use Pipe.
>If you want to get the Stem: TEST. just define in the routine that is
>called
>"PIPE (SEP !) STEM TEST. 1 ! STEM TEST.'
>Than the whole stem TEST. is loaded.
>If you change any of TEST. than you need to pass the stem back to the
>calling routine
>"PIPE (SEP !) STEM TEST. ! STEM TEST. 1"
>
>IF the stem is hugh and you need just a few values of the stem for
>example TEST.3 and TEST.XXX than you can use this
>"PIPE (SEP !) VAR STEM.3 1 ! VAR STEM.3"
>"PIPE (SEP !) VAR STEM.XXX 1 ! VAR STEM.XXX"
>.... Martin
I live in hope that when The Piper retires, and he no longer has access to mainframes,
that we will finally get Pipelines for Linux. :-)
|
|
0
|
|
|
|
Reply
|
Bob
|
2/4/2009 12:07:58 PM
|
|
On Wed, 04 Feb 2009 12:07:58 GMT, Bob Martin wrote:
>I live in hope that when The Piper retires, and he no longer has access to mainframes,
You obviously haven't seen him lugging around his P/390.
�R http://users.bestweb.net/~notr/kartuli "Hush!
They sing choruses in public. That's mad enough, I think."
|
|
0
|
|
|
|
Reply
|
Glenn
|
2/4/2009 3:16:20 PM
|
|
in 3126 20090204 151620 Glenn Knickerbocker <NotR@bestweb.net> wrote:
>On Wed, 04 Feb 2009 12:07:58 GMT, Bob Martin wrote:
>>I live in hope that when The Piper retires, and he no longer has access to mainframes,
>
>You obviously haven't seen him lugging around his P/390.
>
Any dark alleys on his walk to work? Two birds with one stone ;-)
|
|
0
|
|
|
|
Reply
|
Bob
|
2/4/2009 5:30:38 PM
|
|
|
7 Replies
663 Views
(page loaded in 0.075 seconds)
|