On Wed, 18 Jul 2012 09:47:35 -0700, John Mattson <[email protected]> 
wrote:

>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
>


Add "FIRST"  to the end of the find or a "TOP" command in-between the find.

If you used MACROSPY, you would see the cursor position in the spot
where the 4th one will fail.  

--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS       
mailto:[email protected]                                        
Mark's MVS Utilities: http://www.mzelden.com/mvsutil.html 
Systems Programming expert at http://expertanswercenter.techtarget.com/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to