<?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: Search a string in files in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616200#M18115</link>
    <description>&lt;!--!*#--&gt;&amp;gt; [...] I'm new in vms.  [...]&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/os83_index.html" target="_blank"&gt;http://h71000.www7.hp.com/doc/os83_index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/731FINAL/6489/6489PRO.HTML" target="_blank"&gt;http://h71000.www7.hp.com/doc/731FINAL/6489/6489PRO.HTML&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/731final/6489/6489pro_006.html#match_wildcards_sect" target="_blank"&gt;http://h71000.www7.hp.com/doc/731final/6489/6489pro_006.html#match_wildcards_sect&lt;/A&gt;</description>
    <pubDate>Tue, 13 Apr 2010 02:44:15 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2010-04-13T02:44:15Z</dc:date>
    <item>
      <title>Search a string in files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616196#M18111</link>
      <description>Hi experts, I'm new in vms. Would like to search a specific string eg. abc in all the files.&lt;BR /&gt;&lt;BR /&gt;Not sure whether there are commands available or we need to write a script for this.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Tue, 13 Apr 2010 00:47:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616196#M18111</guid>
      <dc:creator>jess_14</dc:creator>
      <dc:date>2010-04-13T00:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Search a string in files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616197#M18112</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] I'm new in vms.  [...]&lt;BR /&gt;&lt;BR /&gt;What are you old in?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] all the files.&lt;BR /&gt;&lt;BR /&gt;All _which_ files?&lt;BR /&gt;&lt;BR /&gt;      HELP SEARCH&lt;BR /&gt;&lt;BR /&gt;For all the files at or below the current&lt;BR /&gt;default directory, something like:&lt;BR /&gt;&lt;BR /&gt;      search [...]*.* abc&lt;BR /&gt;&lt;BR /&gt;For all the files on a particular disk,&lt;BR /&gt;something like:&lt;BR /&gt;&lt;BR /&gt;      search DISK:[000000...]*.* abc&lt;BR /&gt;&lt;BR /&gt;As usual, many things are possible.</description>
      <pubDate>Tue, 13 Apr 2010 01:02:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616197#M18112</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-04-13T01:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Search a string in files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616198#M18113</link>
      <description>To search in the Current Directory, issue&lt;BR /&gt;&lt;BR /&gt;$ set def DISK:[CUR_DIR]&lt;BR /&gt;$ search *.*;* "abc"&lt;BR /&gt;&lt;BR /&gt;To search in the deep rooted directories present in the Current Directory, issue&lt;BR /&gt;&lt;BR /&gt;$ search DISK:[CUR_DIR...]*.*;* "abc"&lt;BR /&gt;&lt;BR /&gt;To search in all directories on a disk&lt;BR /&gt;&lt;BR /&gt;$ search DISK:[000000...]*.*;* "abc"&lt;BR /&gt;&lt;BR /&gt;For more information, have a look at Open VMS help for SEARCH.</description>
      <pubDate>Tue, 13 Apr 2010 01:20:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616198#M18113</guid>
      <dc:creator>Deepa R Shenoy</dc:creator>
      <dc:date>2010-04-13T01:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Search a string in files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616199#M18114</link>
      <description>Hi Jess,&lt;BR /&gt;&lt;BR /&gt;DCL SEARCH command is what you have to use.&lt;BR /&gt;&lt;BR /&gt;$SEARCH &lt;FILE-SPEC&gt; "search-string"&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;1)$ SEARCH *.TXT "ABCD"&lt;BR /&gt;&lt;BR /&gt;  This searches all the "*.TXt" files in the current directory&lt;BR /&gt;  for the string "ABCD".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2)$ SEARCH $DKA100:[USER]*.* "ABCD"&lt;BR /&gt;&lt;BR /&gt;  This searches all the files in the "$DKA100:[USER]" directory&lt;BR /&gt;  for the string "ABCD".&lt;BR /&gt;&lt;BR /&gt;  You can also use the "/STAT" qualifier along with the search to&lt;BR /&gt;  get some useful stats as number of matches, number of&lt;BR /&gt;  lines/characters searched in files, time taken and so on.&lt;BR /&gt;&lt;BR /&gt;Refer the DCL help on SEARCH for more details&lt;BR /&gt;i.e. $ HELP SEARCH&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Murali&lt;/FILE-SPEC&gt;</description>
      <pubDate>Tue, 13 Apr 2010 02:26:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616199#M18114</guid>
      <dc:creator>P Muralidhar Kini</dc:creator>
      <dc:date>2010-04-13T02:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Search a string in files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616200#M18115</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] I'm new in vms.  [...]&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/os83_index.html" target="_blank"&gt;http://h71000.www7.hp.com/doc/os83_index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/731FINAL/6489/6489PRO.HTML" target="_blank"&gt;http://h71000.www7.hp.com/doc/731FINAL/6489/6489PRO.HTML&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/731final/6489/6489pro_006.html#match_wildcards_sect" target="_blank"&gt;http://h71000.www7.hp.com/doc/731final/6489/6489pro_006.html#match_wildcards_sect&lt;/A&gt;</description>
      <pubDate>Tue, 13 Apr 2010 02:44:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616200#M18115</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-04-13T02:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Search a string in files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616201#M18116</link>
      <description>Thanks for the reply! Definitely helps!</description>
      <pubDate>Wed, 14 Apr 2010 02:25:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616201#M18116</guid>
      <dc:creator>jess_14</dc:creator>
      <dc:date>2010-04-14T02:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Search a string in files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616202#M18117</link>
      <description>Hello Murali,&lt;BR /&gt;&lt;BR /&gt;You mentioned.. "You can also use the "/STAT" qualifier along with the search to get some useful stats as number of matches,"&lt;BR /&gt;&lt;BR /&gt;Indeed. And when Jess becomes a little more advanced, He'll appreciated the SYSMBOLS that capture the statistics for further processing.&lt;BR /&gt;&lt;BR /&gt;Personally I've recently started to ditch the full /STAT in favor of /LOG/WIN=0&lt;BR /&gt;&lt;BR /&gt;I feel that this combo often tells me all I need to know: name, records, matches.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Hein&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Apr 2010 03:58:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616202#M18117</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-04-14T03:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Search a string in files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616203#M18118</link>
      <description>Hi Hein,&lt;BR /&gt;&lt;BR /&gt;Yes, thats a good suggestion.&lt;BR /&gt;&lt;BR /&gt;The "/LOG/WIN=0" will give you brief summary of Name, Record &amp;amp; Matches.&lt;BR /&gt;In most cases these information should be sufficient.&lt;BR /&gt;&lt;BR /&gt;I do however use the window qualifer during searching for say some error message in a file. Because this not only gives the error message as output but also lists some code before the error message which would tell why the error is thrown and so on.&lt;BR /&gt;&lt;BR /&gt;I did not use the "/LOG/WIN=0" combination before but would use it going forward.&lt;BR /&gt;&lt;BR /&gt;Thanks N Regards,&lt;BR /&gt;Murali</description>
      <pubDate>Wed, 14 Apr 2010 06:11:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616203#M18118</guid>
      <dc:creator>P Muralidhar Kini</dc:creator>
      <dc:date>2010-04-14T06:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Search a string in files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616204#M18119</link>
      <description>&lt;!--!*#--&gt;Hien,&lt;BR /&gt;&lt;BR /&gt;That is very cool. I use /STAT to do reporting on log files.&lt;BR /&gt;&lt;BR /&gt;I didn't think of using /WIN=0/LOG to provide a filter to serach for MATCHED / NOMATCH.&lt;BR /&gt;&lt;BR /&gt;%SEARCH-S-NOMATCH&lt;BR /&gt;%SEARCH-S-MATCHED&lt;BR /&gt;&lt;BR /&gt;PIPE sea *.log error /win=0/log | sea sys$input MATCHED&lt;BR /&gt;&lt;BR /&gt;This provides a me a easy way to identify files quickly that need to be parsed for additonal info.&lt;BR /&gt;&lt;BR /&gt;Thank you, you just made my day.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Don</description>
      <pubDate>Wed, 14 Apr 2010 16:07:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616204#M18119</guid>
      <dc:creator>Don Nutt</dc:creator>
      <dc:date>2010-04-14T16:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Search a string in files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616205#M18120</link>
      <description>Don,&lt;BR /&gt;  If you're OpenVMS V8 or higher, SEARCH/STAT defines symbols, so there's no need to parse the output:&lt;BR /&gt;&lt;BR /&gt;$ PIPE search/stat/nolog/noout login.com "$" &amp;gt;nl: 2&amp;gt;nl:&lt;BR /&gt;$ show sym search$*&lt;BR /&gt;  SEARCH$CHARACTERS_SEARCHED = "1222"&lt;BR /&gt;  SEARCH$FILES_SEARCHED = "1"&lt;BR /&gt;  SEARCH$LINES_PRINTED = "0"&lt;BR /&gt;  SEARCH$RECORDS_MATCHED = "46"&lt;BR /&gt;  SEARCH$RECORDS_SEARCHED = "46"&lt;BR /&gt;&lt;BR /&gt;I'm using PIPE for output redirection to throw away any output or errors from SEARCH. Since it's a single command, it's executed in the context of the current process.</description>
      <pubDate>Sun, 18 Apr 2010 20:41:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616205#M18120</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2010-04-18T20:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Search a string in files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616206#M18121</link>
      <description>Don,&lt;BR /&gt;&lt;BR /&gt;  Also, instead of parsing for MATCH/NOMATCH, use $STATUS, or even better $SEVERITY :&lt;BR /&gt;&lt;BR /&gt;$ PIPE SEARCH files string &amp;gt;NL: 2&amp;gt;NL:&lt;BR /&gt;$ sev=$SEVERITY&lt;BR /&gt;$ IF sev.EQ.1 &lt;BR /&gt;$ THEN &lt;BR /&gt;$   code if matched&lt;BR /&gt;$ ELSE IF sev.EQ.3&lt;BR /&gt;$ THEN&lt;BR /&gt;$   code if not matched&lt;BR /&gt;$ ELSE&lt;BR /&gt;$   code for error&lt;BR /&gt;$ ENDIF&lt;BR /&gt;$ ENDIF &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 18 Apr 2010 20:48:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/search-a-string-in-files/m-p/4616206#M18121</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2010-04-18T20:48:17Z</dc:date>
    </item>
  </channel>
</rss>

