<?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: Curious Directory Command Behavior in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231835#M27166</link>
    <description>&amp;gt;&amp;gt;Try &lt;BR /&gt;&amp;gt;&amp;gt;$ dir *.log /since /before=03:00:00/date /version=1&lt;BR /&gt;&lt;BR /&gt;Thank you. That does give the intended result, but the question is still "why didn't adding the semi-colon to the dir command produce this result."&lt;BR /&gt;&lt;BR /&gt;If I remove the "/before=03:00" from the command it works as expected, it gives me the latest version but it's after 03:00.&lt;BR /&gt;&lt;BR /&gt;Is there a problem with mixing "/since and /before" or "/after for that matter.&lt;BR /&gt;&lt;BR /&gt;For clarification purposes:  We had a problem between midnight and 3am this morning and I was looking for what might have caused the problem.  Not going to do any processing, just look at logs.</description>
    <pubDate>Wed, 24 Mar 2010 17:23:09 GMT</pubDate>
    <dc:creator>jjinva</dc:creator>
    <dc:date>2010-03-24T17:23:09Z</dc:date>
    <item>
      <title>Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231828#M27159</link>
      <description>VMS8.2 On an ES47:  Attachment shows the commands and results I ran.&lt;BR /&gt;&lt;BR /&gt;Trying to find *.log files created today before 03:00 with the following command:&lt;BR /&gt;&lt;BR /&gt;$ dir *.log /since /before=03:00:00/date&lt;BR /&gt;&lt;BR /&gt;Returns all the log files within the specified time.&lt;BR /&gt;&lt;BR /&gt;Now I want to get only the last version of the log so I use this command that adds a semicolon after *.log.&lt;BR /&gt;&lt;BR /&gt;$ dir *.log; /since /before=03:00:00/date&lt;BR /&gt;&lt;BR /&gt;I was expecting the last version of all the logs but only get the log that had a single entry.  &lt;BR /&gt;&lt;BR /&gt;Is this the expected behavior from this command sequence? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;   &lt;BR /&gt;&lt;BR /&gt;   &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Mar 2010 12:57:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231828#M27159</guid>
      <dc:creator>jjinva</dc:creator>
      <dc:date>2010-03-24T12:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231829#M27160</link>
      <description>It might be, there is insufficient data to tell. &lt;BR /&gt;&lt;BR /&gt;That is what you would see if the latest version of the other TESTx.LOGs is dated after 3am. You would need the output of:&lt;BR /&gt;&lt;BR /&gt; dir *.log; /date&lt;BR /&gt;&lt;BR /&gt;to tell that. ; means specifically "the latest version", not "the latest version that matches these other criteria".</description>
      <pubDate>Wed, 24 Mar 2010 13:08:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231829#M27160</guid>
      <dc:creator>Richard Brodie_1</dc:creator>
      <dc:date>2010-03-24T13:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231830#M27161</link>
      <description>If the goal here is to process a list of log files under application control, then this task is usually a series of lexical functions (including f$search() and f$file_attributes() and f$cvtime() (with the COMPARISON format) and a DCL loop to process each file.  Not with the /OUTPUT of the DIRECTORY command, as I suspect this design might be headed.</description>
      <pubDate>Wed, 24 Mar 2010 13:22:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231830#M27161</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2010-03-24T13:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231831#M27162</link>
      <description>&amp;gt;&amp;gt; dir *.log; /since /before=03:00:00/date&lt;BR /&gt;&amp;gt;&amp;gt;... get the log that had a single entry. &lt;BR /&gt;&amp;gt;&amp;gt; Is this the expected behavior from this command sequence? &lt;BR /&gt;&lt;BR /&gt;Yes. That command tell directory to look for the latest version of all the files with type 'LOG' and prune that result set, leaving only those created today, before 03:00.&lt;BR /&gt;&lt;BR /&gt;You'll need to parse directory output, or like Hoff indicates run your own lookup loop and check the articulates with DCL ( F$FILE "RDT" or "CDT" ).&lt;BR /&gt;Or perhaps with PERL and the STATS array, or perl functions acting on the stats array ( notably -M or -C ).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;btw... I'm sure you know that those version numbers are dangerously close to failing right? (32766 being the max).&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Mar 2010 13:41:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231831#M27162</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-03-24T13:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231832#M27163</link>
      <description>Hein - max version is 32767</description>
      <pubDate>Wed, 24 Mar 2010 16:33:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231832#M27163</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2010-03-24T16:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231833#M27164</link>
      <description>the key thing is the order of the tests.&lt;BR /&gt;1. Find files of that name and the specified version (; means version 0 i.e the highest version)&lt;BR /&gt;2. matching the dates&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Mar 2010 16:38:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231833#M27164</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2010-03-24T16:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231834#M27165</link>
      <description>Try &lt;BR /&gt;$ dir *.log /since /before=03:00:00/date /version=1&lt;BR /&gt;&lt;BR /&gt;that should get you what you were after.</description>
      <pubDate>Wed, 24 Mar 2010 17:07:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231834#M27165</guid>
      <dc:creator>Peter Weaver_1</dc:creator>
      <dc:date>2010-03-24T17:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231835#M27166</link>
      <description>&amp;gt;&amp;gt;Try &lt;BR /&gt;&amp;gt;&amp;gt;$ dir *.log /since /before=03:00:00/date /version=1&lt;BR /&gt;&lt;BR /&gt;Thank you. That does give the intended result, but the question is still "why didn't adding the semi-colon to the dir command produce this result."&lt;BR /&gt;&lt;BR /&gt;If I remove the "/before=03:00" from the command it works as expected, it gives me the latest version but it's after 03:00.&lt;BR /&gt;&lt;BR /&gt;Is there a problem with mixing "/since and /before" or "/after for that matter.&lt;BR /&gt;&lt;BR /&gt;For clarification purposes:  We had a problem between midnight and 3am this morning and I was looking for what might have caused the problem.  Not going to do any processing, just look at logs.</description>
      <pubDate>Wed, 24 Mar 2010 17:23:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231835#M27166</guid>
      <dc:creator>jjinva</dc:creator>
      <dc:date>2010-03-24T17:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231836#M27167</link>
      <description>&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;$ dir *.log /since /before=03:00:00/date /version=1&lt;BR /&gt;&lt;BR /&gt;Thank you. That does give the intended result, but the question is still "why didn't adding the semi-colon to the dir command produce this result."&lt;BR /&gt;&lt;BR /&gt;As I replied before.&lt;BR /&gt;&lt;BR /&gt;Think about it...&lt;BR /&gt;&lt;BR /&gt;How does directory know which files to look at?&lt;BR /&gt;It goes into the directory (that's why it is called 'directory and not DFU) to find files to match the basic file name desired. &lt;BR /&gt;Then it checks whether attributes (other than FID) were requested and whether any filters were specified. If so, it accesses those potential candidates found and looks to see whether those filters apply&lt;BR /&gt;&lt;BR /&gt;The requested match is for: *.LOG;&lt;BR /&gt;That means in OpenVMS speak "the highest version numbered file for each .LOG file.&lt;BR /&gt;Using the output you provided that is for some file with a version higher than 24896.&lt;BR /&gt;&lt;BR /&gt;So it accesses that file, and only that version of that files,  and finds it does not &lt;BR /&gt;fit the date filter.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Mar 2010 18:02:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231836#M27167</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-03-24T18:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231837#M27168</link>
      <description>Thanks to Peter for the solution to what I was looking to do and to Hein for his patient explanation that took a little while to sink in.  I should have assigned 10 points for both but I had assigned points before I figured out that I had an answer.  I owe you both points and will catch up next time.   Thanks again!</description>
      <pubDate>Wed, 24 Mar 2010 19:19:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231837#M27168</guid>
      <dc:creator>jjinva</dc:creator>
      <dc:date>2010-03-24T19:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231838#M27169</link>
      <description>Most welcome. I have plenty of points. No worries there. &lt;BR /&gt;I do appreciate the acknowledgement.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Mar 2010 23:51:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231838#M27169</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-03-24T23:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231839#M27170</link>
      <description>Um, I might be confused then.  &lt;BR /&gt;&lt;BR /&gt;Out of curiosity, why do I get the expected matches for the highest version of each of the files that matches an analogous command on a test system, rather than (as shown in the OP's example) just one match for just one file, even though there are other files that seem to match the selection criteria?&lt;BR /&gt;&lt;BR /&gt;Here, I'm seeing what the OP was expecting to see.  Read down the OP's list of files.  There are other files that should have matched that selection.  Specifically, these files:&lt;BR /&gt;&lt;BR /&gt;TEST2.LOG;8472       24-MAR-2010 02:59:47.78&lt;BR /&gt;&lt;BR /&gt;TEST3.LOG;6627       24-MAR-2010 02:17:13.18&lt;BR /&gt;&lt;BR /&gt;TEST4.LOG;104        24-MAR-2010 02:16:53.49&lt;BR /&gt;&lt;BR /&gt;TEST5.LOG;15964      24-MAR-2010 02:17:12.01&lt;BR /&gt;&lt;BR /&gt;TEST6.LOG;1760       24-MAR-2010 00:19:50.02&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Mar 2010 01:32:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231839#M27170</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2010-03-25T01:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Directory Command Behavior</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231840#M27171</link>
      <description>From the original post it wasn't obvious that there were newer versions of some of the log files.</description>
      <pubDate>Thu, 25 Mar 2010 08:44:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/curious-directory-command-behavior/m-p/5231840#M27171</guid>
      <dc:creator>H.Becker</dc:creator>
      <dc:date>2010-03-25T08:44:02Z</dc:date>
    </item>
  </channel>
</rss>

