View previous topic :: View next topic |
Author |
Message |
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Sep 02, 2004 10:33 am Post subject: Problems with Address Operator '&' |
|
|
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 |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Thu Sep 02, 2004 12:02 pm Post subject: |
|
|
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 |
|
|
sriramla Beginner
Joined: 22 Feb 2003 Posts: 74 Topics: 1
|
Posted: Thu Sep 02, 2004 1:25 pm Post subject: |
|
|
Try ADDRESS ISREDIT "SCAN OFF" in the begining. This may solve the problem. |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Fri Sep 03, 2004 1:33 am Post subject: |
|
|
Thanks Sriramla, Scan off was wonderful.
Thanks a lot
Phantom |
|
Back to top |
|
|
|
|