View previous topic :: View next topic |
Author |
Message |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Fri Jun 20, 2003 6:36 am Post subject: using a variable in a macro |
|
|
Hi all,
i passed a variable into my macro using vput and received it in macro using vget. The code is as below
Quote: |
/************** REXX ***************/
ADDRESS ISPEXEC "VGET (var1) SHARED"
ADDRESS ISREDIT
"MACRO"
" C ALL &var1 'CHK' "
"SAVE"
"END"
RETURN
|
But after executing the rexx pgm, it is not replacing the variable name with CHK. Indeed it is searching for &var1 and replacing it rather than considering the value in the var1.
How to correct this??
Thanks,
Deepesh[/quote] |
|
Back to top |
|
|
dorkhead Beginner
Joined: 07 Jan 2003 Posts: 25 Topics: 0 Location: Lux
|
Posted: Fri Jun 20, 2003 7:58 am Post subject: |
|
|
/************** REXX ***************/
ADDRESS ISPEXEC "VGET (var1) SHARED"
ADDRESS ISREDIT
"MACRO"
" C ALL &var1 'CHK' "
"SAVE"
"END"
RETURN
change " C ALL &var1 'CHK' "
to
" C ALL "var1" 'CHK' " _________________ Dorkhead |
|
Back to top |
|
|
dorkhead Beginner
Joined: 07 Jan 2003 Posts: 25 Topics: 0 Location: Lux
|
Posted: Fri Jun 20, 2003 8:03 am Post subject: |
|
|
and (while I'm at it) you don't need to use ISPF var to pass parm to a macro :
change your "macro" statement to
"MACRO (var1) NOPROCESS"
but that's only if you want to pass a parm to a macro on the call _________________ Dorkhead |
|
Back to top |
|
|
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Sat Jun 21, 2003 4:46 am Post subject: |
|
|
Thanks Dorkhead it worked fine for me.
Deepesh |
|
Back to top |
|
|
|
|