There is not a 'standard' search tool in VM. There are numinous versions that are available for the asking. Just post a request on the VM list. Almost all of them are just a rexx wrapper for the xedit locate function.

I have attached one of my may versions, the one I use mostly.

Tony Thigpen

Binyamin Dissen wrote on 3/20/21 4:09 PM:
Is there a CMS command which will search a minidisk (or group of minidisks)
for files containing a specific string?

Don't see anything obvious in the CMS manual.

--
Binyamin Dissen <bdis...@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
/* SEARCHFL - search for a string in all members of a library */
/*   to use, enter 'SEARCHFL' followed by a file name, file type,
     and file mode (like a filelist command) and after that enter
     a search string i.e. 'SEARCHFL D6D* COBOL A WS-SEARCH'.  A
     filelist screen will then be presented including only those
     members that contain the string 'WS-SEARCH'.     */
trace off
parse arg fn ft fm srcharg
if srcharg = '' then exit 255
 
outfile = 'SEARCHFL FILELIST A'
address command 'ERASE' outfile
 
saveq = queued()
fmx = space(translate(fm,' ',','))
 
do ii = 1 to words(fmx)
    fm = word(fmx,ii)
    'LISTFILE' fn ft fm '(LIFO'
    if rc \= 0 then iterate ii
    do while queued() > saveq
      parse pull xn xt xm
      file = xn xt left(strip(xm,'B'),1)
      ffm = left(strip(xm,'B'),1)
      if fm \= '*' | (ffm \= 'S' & ffm \= 'Y')
        then do
          'EXECIO * DISKR' file '1 (SKIP FINIS LOCATE ¦'srcharg'¦'
          if rc = 0
            then 'EXECIO 1 DISKW' outfile '0 F 80 (STRING' file
        end
    end
end
'FINIS' outfile
 
address command 'STATE' outfile
if rc = 0
  then do
    'FILELIST' outfile '(FILELIST'
    address command 'ERASE' outfile
  end
/*
  else say 'No Files Match' fn ft fm
*/
exit 0

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to