Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pass stem between programs

788 views
Skip to first unread message

Donald Johnson

unread,
Oct 30, 2009, 8:33:59 AM10/30/09
to
Hi friends! I have been unsuccessful in searching archives for this...must
be me!

Is there a way of passing stem variables from one program to another (read
only)?

Thanks!
Don

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Stocker, Herman

unread,
Oct 30, 2009, 8:44:23 AM10/30/09
to
Hi Donald,

Look at the CBT www.cbttape.org for what you want.

Regards,
Herman Stocker

Thanks!
Don

- --


The sender believes that this E-mail and any attachments were free of any
virus, worm, Trojan horse, and/or malicious code when sent. This message and
its attachments could have been infected during transmission. By reading the
message and opening any attachments, the recipient accepts full
responsibility for taking protective and remedial action about viruses and
other defects. The sender's employer is not liable for any loss or damage
arising in any way from this message or its attachments.

Donald Johnson

unread,
Oct 30, 2009, 11:08:19 AM10/30/09
to
Herman, I found lots of things to do with stem variables, but I didn't see
anything specifically about passing them between Rexx programs. Anything
specific you are aware of?

Don

Stocker, Herman

unread,
Oct 30, 2009, 11:24:56 AM10/30/09
to
Donald,

Look at file 182-3? (STEMEDIT, STEMPULL, STEMPUSH & STEMVIEW also STEMVIEW &
STEPDISP (alias VSAMVIEW)

I think they are all from Gilbert Saint-flour.

Good Luck.

Lizette Koehler

unread,
Oct 30, 2009, 11:27:35 AM10/30/09
to
The only way I have found to pass stem vars it to create one var with all the info in it, delimited, then in the next procedure, put it back in to a stem var using the delimiter I used to create it. It is cumbersome and not efficient but works.

Maybe someone else has a better way to pass stems.

Lizette


>
>Herman, I found lots of things to do with stem variables, but I didn't see
>anything specifically about passing them between Rexx programs. Anything
>specific you are aware of?
>
>Don
>
>On Fri, Oct 30, 2009 at 8:43 AM, Stocker, Herman <
>herman....@avisbudget.com> wrote:
>
>> Hi Donald,
>>
>> Look at the CBT www.cbttape.org for what you want.
>>
>> Regards,
>> Herman Stocker
>>

>>
>>

Marc V Irvin

unread,
Oct 30, 2009, 12:27:20 PM10/30/09
to
Rexxers,

It is easy to pass variables using the interpret command. That works for REXX HTMLs to coupled with Global Variables.

passlist = 'vara="'vara'";varb="'varb'";etc...'

passlist = subpassingbackvars(da dah da dah dah)
if \datatype(passlist,'N') then interpret passlist

Marc Irvin
Analyst Admin, IT Security
Pitney Bowes
PB Internal: 8-421-3422 | External: (203) 739-3422 | Mobile (USA): +1 203 820-3013

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Lizette Koehler
Sent: Friday, October 30, 2009 11:27 AM
To: TSO-...@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Pass stem between programs

Jeff Byrum

unread,
Oct 30, 2009, 1:41:25 PM10/30/09
to
I do something very similar for external subroutines that need to pass back a compound (stem) variable:

ADDRESS TSO "NEWSTACK"
Call 'SUBRTNX' parm
XXX. = ''
Do QUEUED()
PARSE PULL NEXTCMD
INTERPRET NEXTCMD
End
ADDRESS TSO "DELSTACK"

The subroutine just creates commands to initialize the compound variables and stacks them:

For example:
VAL = 'X21'
QUEUE 'VAR.1 =' VAL
VAL = 'Z43'
QUEUE 'VAR.2 =' VAL
QUEUE 'VAR.0 = 2'

The result is that the calling program now has a defined compound variable that has these values:

VAR.1 = 'X21'
VAR.2 = 'Z43'
VAR.0 = 2

(This is just a simplified illustration -- I actually use a variable for the left side of the assignment and build the commands within a loop.)

I know there are concerns about using INTERPRET, but the subroutine does not provide any possibility for user input to modify the values that get used.

Stocker, Herman

unread,
Oct 30, 2009, 3:13:00 PM10/30/09
to
Donald,

There is also REXX GLOBALV from Willy Jensen. Sorry I do not know his URL.

Regards,
Herman Stocker
Technical Specialist


The sender believes that this E-mail and any attachments were free of any
virus, worm, Trojan horse, and/or malicious code when sent. This message and
its attachments could have been infected during transmission. By reading the
message and opening any attachments, the recipient accepts full
responsibility for taking protective and remedial action about viruses and
other defects. The sender's employer is not liable for any loss or damage
arising in any way from this message or its attachments.

----------------------------------------------------------------------

Donald Johnson

unread,
Oct 30, 2009, 4:51:29 PM10/30/09
to
Thanks! I will check this out!
Don

Robert Zenuk

unread,
Oct 30, 2009, 10:33:43 PM10/30/09
to
Here is a working example of passing a stem between 2 external routines.
This is an example that exploits both Marc's and Jeff's approaches, but
requires no preparation of variables. This assumes 2 things, 1) the stack is
available and 2) you are willing to use multi-level stems in your code.
Multi-level stems avoid the need for interpret in this case. Notice the stem
name can change between the 2 routines since the raw data is passed
through the stack.

I wrote 2 small functioning routines:

STEMPUSH - Push a STEM onto the stack
STEMPULL - Pull a STEM off the stack

In your passing code, do something like this:

/* stempush */
stem.a.1 = 'test1'
stem.a.2 = 'test2'
stem.a.3 = 'test3'
stem.a.4 = 'test4'
stem.a.5 = 'test5'
stem.a.0 = 5
say 'PRT A'
call stemprt 'A'
say 'PUT A'
call stemput 'A'
say 'Call STEMPULL'
call stempull
say 'Use STEMPULL as a function'
call stemput 'A'
x = stempull()
exit 0
stemprt: arg stemvar
do i=1 to stem.stemvar.0
say stem.stemvar.i
end
return 0
stemput: arg stemvar
"NEWSTACK"
do i=1 to stem.stemvar.0
queue stem.stemvar.i
end
return 0

In your receiving code, do something like this:

/* stempull */
say 'GET B'
call stemget 'B'
say 'PRT B'
call stemprt 'B'
exit 0
stemprt: arg stemvar
do i=1 to stem.stemvar.0
say stem.stemvar.i
end
return 0
stemget: arg stemvar
do i=1 to queued()
parse pull value
stem.stemvar.i = value
stem.stemvar.0 = i
end
"DELSTACK"
return 0


Sorry if the indenting gets lost...

Hope this helps,

Rob


In a message dated 10/30/2009 10:41:51 A.M. US Mountain Standard Tim,
Jeff....@ASG.COM writes:

Rexxers,

Lizette

>Don
>


>On Fri, Oct 30, 2009 at 8:43 AM, Stocker, Herman <
>herman....@avisbudget.com> wrote:
>
>> Hi Donald,
>>
>> Look at the CBT www.cbttape.org for what you want.
>>
>> Regards,
>> Herman Stocker
>>

>>
>>
>> Hi friends! I have been unsuccessful in searching archives for
this...must
>> be me!
>>
>> Is there a way of passing stem variables from one program to another
(read
>> only)?
>>
>> Thanks!
>> Don
>>
>>

----------------------------------------------------------------------

wjensen_1

unread,
Oct 31, 2009, 5:46:27 AM10/31/09
to
Hi,
REXX Globalv (REXXGBLV) can be found here: http://www.wjensen.com/WJTECH/mypgm/mypgm.html

Willy

Rick Woods

unread,
Oct 31, 2009, 11:30:01 AM10/31/09
to
The RLX products from Relational Architects contain a whole slew of useful REXX functions, among them a stem-passing feature.
- Rick

>>> "Stocker, Herman" <herman....@AVISBUDGET.COM> 10/30/2009 12:12 PM >>>

Captain Paralytic

unread,
Nov 3, 2009, 2:31:49 PM11/3/09
to
On 30 Oct, 12:33, dej....@GMAIL.COM (Donald Johnson) wrote:
> Hi friends! I have been unsuccessful in searching archives for this...must
> be me!
>
> Is there a way of passing stem variables from one program to another (read
> only)?
>
> Thanks!
> Don
>
> ----------------------------------------------------------------------
> For TSO-REXX subscribe / signoff / archive access instructions,
> send email to LISTS...@VM.MARIST.EDU with the message: INFO TSO-REXX

CMS/TSO PIPELINES

0 new messages