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 

Problems with Address Operator '&'

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


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Sep 02, 2004 10:33 am    Post subject: Problems with Address Operator '&' Reply with quote

I have a ISREDIT macro which changes all '&P..' symbolics in a jcl to 'P.' but I got a return code of 4 for the CHANGE command.

Code:

   "ISREDIT CHANGE ALL ' DSN=&P..'  ' DSN=P.'  NX"


But the address operator '&' forces rexx to consider &P as a variable P instead of a literal. So the macro is looking for some variable by name 'P'. since my program doesnot have any such variables the change command fails.

I tried the following code
Code:

   P = '&P.'
  "ISREDIT CHANGE ALL ' DSN=&P..'    ' DSN=P.'  NX"


The above mentioned code works fine, but I would like to know whether there is any escape sequence (direct way) to consider &P. as a literal instead of a variable ?

I tried &&P but this didn't work either.

Please guide me
Thanks,
Phantom
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Thu Sep 02, 2004 12:02 pm    Post subject: Reply with quote

Hi

Try this:
Code:
/* REXX */                                         
                                                   
ADDRESS ISREDIT "MACRO PROCESS"                     
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"             
                                                   
VAR1 = C2X(' DSN=&P..')                             
VAR2 = C2X(' DSN=P.')                               
                                                   
ADDRESS ISREDIT "CHANGE ALL X'"VAR1"' X'"VAR2"'  NX"
                                                   
EXIT                                               


O.
________
white widow seeds


Last edited by ofer71 on Sat Feb 05, 2011 11:19 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
sriramla
Beginner


Joined: 22 Feb 2003
Posts: 74
Topics: 1

PostPosted: Thu Sep 02, 2004 1:25 pm    Post subject: Reply with quote

Try ADDRESS ISREDIT "SCAN OFF" in the begining. This may solve the problem.
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Sep 03, 2004 1:33 am    Post subject: Reply with quote

Thanks Sriramla, Scan off was wonderful.

Thanks a lot
Phantom
Back to top
View user's profile Send private message
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