View previous topic :: View next topic
|
Author |
Message |
Vkp321
New User
Joined: 05 Jan 2009 Posts: 56 Location: Dublin
|
|
|
|
Hi,
Rexx program A is calling program B. Program A is passing three varibles to program B. Program B is manipulating these three variable, I need the value of these three variables in Program A, I tried below code but it has not worked. Please help
A
/* REXX */
call B v1 v2 v3
say v1 v2 v3
B
/* REXX */
ARG v1 v2 v3
v1= 1
v2=2
v3=3 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
in REXX there is no provision for passing <global> <tokens> between <external> procedures
for procedures inside the same source member read about the EXPOSE clause
if Your rexx runs under the ISPF environment You might use VPUTs and VGETs
if your organization allows the use of freeware applications You might check
www.btinternet.com/~ashleys/fadh_globalv.htm
or write Your own, not that much complicated |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
This call/return structure worked for me.
Code: |
/* REXX PROGRAM A*/
V1 = 'A-VALUE1'
V2 = 'A-VALUE2'
V3 = 'A-VALUE3'
CALL "B" V1 V2 V3
PARSE VAR RESULT V1 V2 V3
SAY 'BACK IN PROGRAM A VALUES -' V1 V2 V3
EXIT
/* REXX PROGRAM B */
ARG V1 V2 V3
SAY 'IN PROGRAM B VALUES -' V1 V2 V3
V1 = 'B-VALUE1'
V2 = 'B-VALUE2'
V3 = 'B-VALUE3'
EXIT V1 V2 V3 |
|
|
Back to top |
|
|
|