<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Obtaining only filenames from a wildcard search in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947743#M33195</link>
    <description>Jan,&lt;BR /&gt;&lt;BR /&gt;there never was an OpenVMS V7.3-2 patch including SEARCH.EXE, which I would have expected, if the /LIMIT qualifier would be supposed to work. I also tried SEARCH/LIMIT on a V7.3-2 system including VMS732_UPDATE-V0400 and it didn't work (%DCL-W-IVQUAL).&lt;BR /&gt;&lt;BR /&gt;John,&lt;BR /&gt;&lt;BR /&gt;time to upgrade to V8.2&lt;BR /&gt;&lt;BR /&gt;Volker.</description>
    <pubDate>Tue, 20 Dec 2005 06:10:22 GMT</pubDate>
    <dc:creator>Volker Halle</dc:creator>
    <dc:date>2005-12-20T06:10:22Z</dc:date>
    <item>
      <title>Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947735#M33187</link>
      <description>I would like to obtain the names of files which contain a specified character string so that I can process only those files.  (eg. find the names of all .DAT files containing a specific string so each of those files can then be updated.  Okay, maybe not the most brilliant example but it gives you the general picture.)&lt;BR /&gt;&lt;BR /&gt;It really requires finding only the first instance of the string within the file and then saving the filename and terminating the search.&lt;BR /&gt;&lt;BR /&gt;I'd prefer not to use SEARCH/OUTPUT=OUT.TXT *.C &lt;STRING&gt; because the output file might be huge and that's not attractive when I'm working in DCL.&lt;BR /&gt;&lt;BR /&gt;I'd also prefer not to use F$SEARCH("*.*") and feed each file to SEARCH/OUTPUT=NL: (etc.) then examine the $SEVERITY because in my case this would mean about 850 activations of the SEARCH.EXE image.&lt;BR /&gt;&lt;BR /&gt;Ideally I want a SEARCH/INSTANCES=1/OUTPUT=... etc. (which stops after finding the first instance) and then I could use the contents of the output file for the subsequent processing.  This would minimise the use of cpu, I/O and disk-space.&lt;BR /&gt;&lt;BR /&gt;Any suggestions ?&lt;BR /&gt;&lt;BR /&gt;Thanks i a,&lt;BR /&gt;&lt;BR /&gt;John&lt;BR /&gt;&lt;BR /&gt;&lt;/STRING&gt;</description>
      <pubDate>Mon, 19 Dec 2005 22:17:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947735#M33187</guid>
      <dc:creator>John D McLean</dc:creator>
      <dc:date>2005-12-19T22:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947736#M33188</link>
      <description>I'd use a loop with F$SEARCH(), and not worry&lt;BR /&gt;about activating SEARCH.EXE.  (If it's not&lt;BR /&gt;already INSTALLed, I'd change that.)&lt;BR /&gt;&lt;BR /&gt;_If_ that were too slow, then I'd write my own&lt;BR /&gt;program(s).</description>
      <pubDate>Mon, 19 Dec 2005 22:39:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947736#M33188</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2005-12-19T22:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947737#M33189</link>
      <description>Steven - I said that I would prefer not to use that method.  Apart from the activations, image if the desired string was located in record 1 of a 10 000 record file?  SEARCH would rather inefficiently (for my needs) continue to examine the file even after finding the string in record 1.&lt;BR /&gt;&lt;BR /&gt;Maybe I could write a program and there are ways to make it fast (eg. use $QIO to read logical blocks because I don't need to know the exact location) but my preference is to use some existing and efficient tool if one can be found.&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Mon, 19 Dec 2005 23:40:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947737#M33189</guid>
      <dc:creator>John D McLean</dc:creator>
      <dc:date>2005-12-19T23:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947738#M33190</link>
      <description>&amp;gt; I said that I would prefer not to use that&lt;BR /&gt;&amp;gt; method.&lt;BR /&gt;&lt;BR /&gt;I was trying to overlook that part.&lt;BR /&gt;&lt;BR /&gt;So far as I can see, unlike DIFFERENCES, with&lt;BR /&gt;its /MAXIMUM_DIFFERENCES=n option, SEARCH&lt;BR /&gt;appears too diligent, and won't quit early.&lt;BR /&gt;Overcoming that feature shortage would appear&lt;BR /&gt;to require a fresh program.  (I don't know of&lt;BR /&gt;an existing one, but that's not a&lt;BR /&gt;nonexistence proof by any stretch.)&lt;BR /&gt;&lt;BR /&gt;I tend toward an incremental approach on&lt;BR /&gt;these sorts of tasks, writing something&lt;BR /&gt;which works, and then trying to speed up the&lt;BR /&gt;pieces where needed, as needed.  Thus, I'd&lt;BR /&gt;start with a rather simple search-like&lt;BR /&gt;program, and make the I/O fancier later, as&lt;BR /&gt;needed.  With all the multi-buffer,&lt;BR /&gt;read-ahead, and so on stuff accessible with&lt;BR /&gt;some ease through the C RTL, I'd tend to&lt;BR /&gt;avoid excessive complexity (read: "work")&lt;BR /&gt;until it was forced upon me.&lt;BR /&gt;&lt;BR /&gt;If you want to do a client-server system with&lt;BR /&gt;one process looking up the file names while&lt;BR /&gt;another does the searches (with some fancy&lt;BR /&gt;inter-process comm scheme), be my guest.  I'm&lt;BR /&gt;sure it could save a lot of image&lt;BR /&gt;activations, but I don't know how much that&lt;BR /&gt;would actually buy you.  (And I know that&lt;BR /&gt;it'd be more work.)</description>
      <pubDate>Mon, 19 Dec 2005 23:59:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947738#M33190</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2005-12-19T23:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947739#M33191</link>
      <description>&lt;BR /&gt;Uh... why not just use SEARC/OUT=OUT.TXT/WIND=0 *.c &lt;STRING&gt;&lt;BR /&gt;&lt;BR /&gt;only when you  are dealing with Gigiabyte sized files woudl I worry about a little extra time spend reading the whole file. a few thousand line more or less surely go unnoticed as long as your have a reasonable RMS default block size. 16KN new default, or chose your own: SET RMS/BUF=4/BLO=120&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But if you feel you need to stop after the first match (not unreasonable I might add), how about perl? :&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ perl -e "foreach $f (&amp;lt;*.c&amp;gt;) { open(F,""&amp;lt;$f""); foreach (&lt;F&gt;) { if (/string/) {print ""$f\n""; last;}}}"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;/F&gt;&lt;/STRING&gt;</description>
      <pubDate>Tue, 20 Dec 2005 01:20:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947739#M33191</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-12-20T01:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947740#M33192</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;there now (as of OpenVMS V8.2) is a SEARCH/LIMIT=n qualifier, which&lt;BR /&gt;limits the number of matches displayed to the number specified by n.&lt;BR /&gt;&lt;BR /&gt;Volker.&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Dec 2005 01:45:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947740#M33192</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2005-12-20T01:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947741#M33193</link>
      <description>I thought of proposing freeware grep but a test revealed that grep -l did read the complete file. &lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Tue, 20 Dec 2005 01:59:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947741#M33193</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2005-12-20T01:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947742#M33194</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;Let me start with:&lt;BR /&gt;&lt;BR /&gt;WELCOME to the VMS forum!&lt;BR /&gt;&lt;BR /&gt;From Volker's answer:&lt;BR /&gt;&lt;BR /&gt;&lt;QUOTE&gt;&lt;BR /&gt;there now (as of OpenVMS V8.2) is a SEARCH/LIMIT=n qualifier, which&lt;BR /&gt;limits the number of matches displayed to the number specified by n.&lt;BR /&gt;&lt;/QUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;Please be informed that this functionality also exists in V7.3-2, since one of its earlier patches.&lt;BR /&gt;&lt;BR /&gt;using /LIMIT=1 pretty much seems to do what you are asking.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So, it becomes of interest which VMS version you are using... &lt;BR /&gt;&lt;BR /&gt;fwiw&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe</description>
      <pubDate>Tue, 20 Dec 2005 05:35:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947742#M33194</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2005-12-20T05:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947743#M33195</link>
      <description>Jan,&lt;BR /&gt;&lt;BR /&gt;there never was an OpenVMS V7.3-2 patch including SEARCH.EXE, which I would have expected, if the /LIMIT qualifier would be supposed to work. I also tried SEARCH/LIMIT on a V7.3-2 system including VMS732_UPDATE-V0400 and it didn't work (%DCL-W-IVQUAL).&lt;BR /&gt;&lt;BR /&gt;John,&lt;BR /&gt;&lt;BR /&gt;time to upgrade to V8.2&lt;BR /&gt;&lt;BR /&gt;Volker.</description>
      <pubDate>Tue, 20 Dec 2005 06:10:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947743#M33195</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2005-12-20T06:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947744#M33196</link>
      <description>Volker,&lt;BR /&gt;&lt;BR /&gt;just tested it, and you are right.&lt;BR /&gt;&lt;BR /&gt;This is strange, though. I vividly remember Guy Peleg announcing it, both in Nashua at the bootcamp, and again during the Dutch TUD, in the session on DCL enhancements.&lt;BR /&gt;And and if my memory is not REALLY derailed, this, and several other SEARCH additions, were also in 7.3-2.&lt;BR /&gt;--- but I clearly never had any specific uses for it yet ---&lt;BR /&gt;&lt;BR /&gt;So, this DOES make a point for backporting this to 7.3-2 ASAP. After all, it IS still supported, and will stay on PVS for some time to come.&lt;BR /&gt;HP, listening in anyone?&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe</description>
      <pubDate>Tue, 20 Dec 2005 08:28:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947744#M33196</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2005-12-20T08:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947745#M33197</link>
      <description>&lt;BR /&gt;I don't have an 8.2 system handy to verify this, but I suspect that this /LIMIT discussion is a moot point.&lt;BR /&gt;&lt;BR /&gt;The manual indicates it only limits the display.&lt;BR /&gt;&lt;BR /&gt;I expect the /STAT to indicate that the whole file was read and counts the actual matched, not just the /limit, much like /window=0 behaves.&lt;BR /&gt;&lt;BR /&gt;John's desire, reasonable or not, was to stop reading after a match. My perl solution will do just that.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Dec 2005 08:58:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947745#M33197</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-12-20T08:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947746#M33198</link>
      <description>Hein,&lt;BR /&gt;&lt;BR /&gt;SEARCH/LIMIT=1/STAT indicates (as compared to the same SEARCH/STAT without /LIMIT), that Records searched is actually much smaller, as well as CPU time used and Elapsed Time.&lt;BR /&gt;&lt;BR /&gt;Guy seems to have done a good job ;-)&lt;BR /&gt;&lt;BR /&gt;Volker.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Dec 2005 09:04:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947746#M33198</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2005-12-20T09:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947747#M33199</link>
      <description>&lt;BR /&gt;Thanks for verifying Volker!&lt;BR /&gt;So the documenation could have been better. &lt;BR /&gt;It was not wrong, it just could have been better.&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Dec 2005 09:07:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947747#M33199</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-12-20T09:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947748#M33200</link>
      <description>Thanks Volker, Jan &amp;amp; Hein&lt;BR /&gt;&lt;BR /&gt;It's nice to know that someone else has had the same problem and addressed it at some stage.  The qualifier /LIMIT might not be commonly used but it will be perfect for some operations.&lt;BR /&gt;&lt;BR /&gt;This system is on 7.3-2 with 19 patches with name prefix of "VMS732_" but SEARCH/LIMIT still fails.&lt;BR /&gt;&lt;BR /&gt;If anyone can determine which (if any) 7.3-2 patch the change was in I'd like to be told.  &lt;BR /&gt;&lt;BR /&gt;Otherwise since I'm only a contractor here I'll need to start pushing for a VMS upgrade. That might not be easy because there's a plan - you know the story - but if they want the functionality here it seems like the upgrade is necessary.&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Tue, 20 Dec 2005 18:05:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947748#M33200</guid>
      <dc:creator>John D McLean</dc:creator>
      <dc:date>2005-12-20T18:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947749#M33201</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;if an upgrade is not possible at the moment, pls. have a look at the FIND utility. You can find it on the freeare CD, it is a kit from HP and is installed ising PCSI.&lt;BR /&gt;&lt;BR /&gt;It is a combination of search and optional replace and has a /LIMIT qualifier.&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Wed, 21 Dec 2005 01:17:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947749#M33201</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2005-12-21T01:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947750#M33202</link>
      <description>&lt;BR /&gt;Thanks Kalle, I'll check out the Freeware with the software distribution kits or, as a last resort, I'll download the ZIPped CD.&lt;BR /&gt;&lt;BR /&gt;I'll leave this thread open for another 24 hours for further comments.  I think everything has been covered but maybe someone can surprise me.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Wed, 21 Dec 2005 17:29:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947750#M33202</guid>
      <dc:creator>John D McLean</dc:creator>
      <dc:date>2005-12-21T17:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947751#M33203</link>
      <description>I have Alpha 7.3-2 Update 5 installed plus latest patches. SEARCH/LIMIT gives:&lt;BR /&gt;CVTS1Â» sea/limit=1 "login" *.com&lt;BR /&gt;%DCL-W-IVQUAL, unrecognized qualifier - check validity, spelling, and placement&lt;BR /&gt; \LIMIT\&lt;BR /&gt;Lawrence</description>
      <pubDate>Thu, 22 Dec 2005 13:06:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947751#M33203</guid>
      <dc:creator>Lawrence Czlapinski</dc:creator>
      <dc:date>2005-12-22T13:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining only filenames from a wildcard search</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947752#M33204</link>
      <description>&lt;BR /&gt;Thanks all.&lt;BR /&gt;&lt;BR /&gt;To summarize for any future reader, SEARCH/LIMIT=1 looks the best way to go but it only became available with VMS 8.2.  I'm on a 7.3-2 system so I need to either get VMS upgraded or use the FIND program on the Freeware.&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Thu, 22 Dec 2005 16:35:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/obtaining-only-filenames-from-a-wildcard-search/m-p/4947752#M33204</guid>
      <dc:creator>John D McLean</dc:creator>
      <dc:date>2005-12-22T16:35:18Z</dc:date>
    </item>
  </channel>
</rss>

