Uh, I don't think so.
You're thinking CLIST not REXX.
Try adding the statement: &PDQR="A"
Ahead of the first ISREDIT statement that uses it and you will get the error:
9 *-* &PDQR="A"
9 +++ &PDQR="A"
IRX0035I Error running XMAC, line 9: Invalid expression
***
If you then change the &PDQR="A" to PDQR="A" and try it again:
9 *-* PDQR="A"
>L> "A"
10 *-* findstr = "DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.("
>L> "DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.("
11 *-* "ISREDIT F ALL C'"findstr"'
"
>L> "ISREDIT F ALL C'"
>V> "DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.("
>O> "ISREDIT F ALL C'DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.("
>L> "' "
>O> "ISREDIT F ALL C'DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.('
"
+++ RC(4) +++
12 *-* "isredit f all x'"c2x("(")"' "
>L> "isredit f all x'"
>L> "("
>F> "4D"
>O> "isredit f all x'4D"
>L> "' "
>O> "isredit f all x'4D' "
13 *-* TRACE N
***
You will see in the trace that &PDQR was not substituted.
If this was a CLIST, I would agree with you, but this is REXX and REXX doesn't
use "&" in it's variable names.
Charles (Chuck) Hardee
Senior Systems Engineer
Database Administration
Information Technology Services
Thermo Fisher Scientific
300 Industry Drive
Pittsburgh, PA 15275
Direct: 724-517-2633
FAX: 412-490-9230
[email protected]
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Thomas Berg
Sent: Wednesday, July 18, 2012 1:27 PM
To: [email protected]
Subject: SV: REXX ISPF edit FIND failing
The problem is that ISPF/ISREDIT evaluates/substitutes any ISPF variable, which
in this case is "&PDQR".
So:
ISREDIT F ALL 'DISP=SHR,DSN=MSYS.UCMD.REMOTE' "
is the same as
"ISREDIT F ALL 'DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR' "
and is the same as
"ISREDIT F ALL 'DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.' "
In the latter two cases (apparently) "&PDQR" resolves into "" (empty) and
"&PDQR." also. (The dot "." is used as an end-of-variable-name marker, IIRC.)
In e g this:
"ISREDIT F ALL 'DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.(' "
- resolves to: "ISREDIT F ALL 'DISP=SHR,DSN=MSYS.UCMD.REMOTE(' "
wich is no to be found in the dataset.
Etc.
Regards,
Thomas Berg
_______________________________________________________
Thomas Berg Specialist AM/SM&S SWEDBANK AB (publ)
> -----Ursprungligt meddelande-----
> Från: IBM Mainframe Discussion List [mailto:[email protected]]
> För John Mattson
> Skickat: den 18 juli 2012 18:48
> Till: [email protected]
> Ämne: REXX ISPF edit FIND failing
>
> I have a little dataset which contains
> //REMOTE DD DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.(&SYSTEM)
> //REMOTE DD DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.(SYSTEM)
> //REMOTE DD DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR(SYSTEM)
> //SYSIN DD DISP=SHR,DSN=&PDQ.ALC.UNVLIB(&UCMIN)
> X/MYSCRIPT DD DISP=SHR,DSN=&PDQ.ALC.UNVLIB(&MY)
>
> I have a little REXX which I want to "FIND" these strings
> /* REXX */
> TRACE I
> Address ISPEXEC
> "ISREDIT MACRO (MEM) NOPROCESS"
> "CONTROL ERRORS RETURN"
> "ISREDIT F ALL 'DISP=SHR,DSN=MSYS.UCMD.REMOTE' "
> "ISREDIT F ALL 'DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR' "
> "ISREDIT F ALL 'DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.' "
> "ISREDIT F ALL 'DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.(' "
> "ISREDIT F ALL 'DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.(&' "
> "ISREDIT F ALL 'DISP=SHR,DSN=MSYS.UCMD.REMOTE&PDQR.(&SYSTEM)' "
> "ISREDIT F ALL 'DISP=SHR,DSN=&PDQ.ALC.UNVLIB(&UCMIN)' "
> "ISREDIT F ALL 'DISP=SHR,DSN=&PDQ.ALC.UNVLIB(&MY)' "
> EXIT
>
> The First Three FIND's work fine. Starting from the fourth
> find, they all get RC=4, not found. Even tho I can clearly see that the
> strings exist in the dataset. What in the whirled is going on here?? Is
> there something "special" about two &'s in a string? I have tried
> removing the second & from both the find and my dataset and the find
> still fails. I am at wits end here.
> I have also tried "extracting" the actual finds like: F ALL
> 'DISP=SHR,DSN=&PDQ.ALC.UNVLIB(&MY)'and executing them in TSO, and they
> all work. What is special here. FYI, the final " is in col 71
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send
> email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN