MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

using a variable in a macro

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
deepeshk79
Beginner


Joined: 20 Jun 2003
Posts: 112
Topics: 48
Location: Bangalore

PostPosted: Fri Jun 20, 2003 6:36 am    Post subject: using a variable in a macro Reply with quote

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
View user's profile Send private message AIM Address  
dorkhead
Beginner


Joined: 07 Jan 2003
Posts: 25
Topics: 0
Location: Lux

PostPosted: Fri Jun 20, 2003 7:58 am    Post subject: Reply with quote

/************** 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
View user's profile Send private message Visit poster's website  
dorkhead
Beginner


Joined: 07 Jan 2003
Posts: 25
Topics: 0
Location: Lux

PostPosted: Fri Jun 20, 2003 8:03 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website  
deepeshk79
Beginner


Joined: 20 Jun 2003
Posts: 112
Topics: 48
Location: Bangalore

PostPosted: Sat Jun 21, 2003 4:46 am    Post subject: Reply with quote

Thanks Dorkhead it worked fine for me.

Deepesh
Back to top
View user's profile Send private message AIM Address  
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group