<?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: Bug in OPENVMS? in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3483004#M4806</link>
    <description>If I interpret the code fragment correctly, the rename command does not necessarily rename the zero block file.  If COUNTC1 = 1, and there is a ;3 and a ;2 version of the file.  The f$file lexicals would check on ;2 (i.e. "dwh$stats:ssub130c1.dat;-''countc1'" = "dwh$stats:ssub130c1.dat;-1"), but the rename command would affect ;3.  I concur with Jan's suggestion.</description>
    <pubDate>Thu, 10 Feb 2005 11:32:04 GMT</pubDate>
    <dc:creator>Garry Fruth</dc:creator>
    <dc:date>2005-02-10T11:32:04Z</dc:date>
    <item>
      <title>Bug in OPENVMS?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482994#M4796</link>
      <description>I am using the following dcl to look at the file attributes of a file and if the file is zero blocks and zero allocated, to rename the file to .bad&lt;BR /&gt;&lt;BR /&gt;Occasionally, even though such a file is found, it does not rename it and no error messages appear.  If I run the command over, then it works.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ sts1 =   f$file_attributes("dwh$stats:ssub130c1.dat;-''countc1'","alq")&lt;BR /&gt;$ sts2 =   f$file_attributes("dwh$stats:ssub130c1.dat;-''countc1'","eof")&lt;BR /&gt;$ if sts2 .eq. "0" .and. sts1 .eq. "0" then rename/log dwh$stats:ssub130c1.dat; .bad&lt;BR /&gt;&lt;BR /&gt;Any suggestions?</description>
      <pubDate>Thu, 10 Feb 2005 10:05:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482994#M4796</guid>
      <dc:creator>Randy Armstrong</dc:creator>
      <dc:date>2005-02-10T10:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in OPENVMS?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482995#M4797</link>
      <description>I have one suggestion -- remove the quotation marks from the zeros in the if statement.&lt;BR /&gt;&lt;BR /&gt;See if that makes any difference. &lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Robert</description>
      <pubDate>Thu, 10 Feb 2005 10:21:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482995#M4797</guid>
      <dc:creator>Robert_Boyd</dc:creator>
      <dc:date>2005-02-10T10:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in OPENVMS?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482996#M4798</link>
      <description>Could there be something else accessing the file or directory at the time of the rename?&lt;BR /&gt;How do you know that the file is found but the rename fails?&lt;BR /&gt;&lt;BR /&gt;If you did&lt;BR /&gt;$ if sts2 .eq. "0" .and. sts1 .eq. "0" &lt;BR /&gt;$ then &lt;BR /&gt;$     write sys$outout "renaming file"&lt;BR /&gt;$     rename/log dwh$stats:ssub130c1.dat;&lt;BR /&gt;$ endif&lt;BR /&gt;&lt;BR /&gt;then you would know the if statement was true and the rename attempted.</description>
      <pubDate>Thu, 10 Feb 2005 10:21:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482996#M4798</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2005-02-10T10:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in OPENVMS?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482997#M4799</link>
      <description>For me, some other application keep file locked so rename fails.&lt;BR /&gt;However .eq. operator works only with number and you could remove quotes from zero.&lt;BR /&gt;Again, after rename, store status: you can understand why rename doesn't work.&lt;BR /&gt; &lt;BR /&gt;Antonio Vigliotti&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Feb 2005 10:26:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482997#M4799</guid>
      <dc:creator>Antoniov.</dc:creator>
      <dc:date>2005-02-10T10:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in OPENVMS?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482998#M4800</link>
      <description>Randy,&lt;BR /&gt;Can we look at &lt;BR /&gt;&lt;BR /&gt;$ sh sym sts1&lt;BR /&gt;$ sh sym sts2 &lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;Mobeen</description>
      <pubDate>Thu, 10 Feb 2005 10:26:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482998#M4800</guid>
      <dc:creator>Mobeen_1</dc:creator>
      <dc:date>2005-02-10T10:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in OPENVMS?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482999#M4801</link>
      <description>Randy,&lt;BR /&gt;&lt;BR /&gt;Welcome to the VMS forum!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;two things:&lt;BR /&gt;&lt;BR /&gt;You are trying to rename another file than the one you are checking!&lt;BR /&gt;&lt;BR /&gt;(unless there is only one version, and "countc1" equals 0 (zero).&lt;BR /&gt;&lt;BR /&gt;&lt;SPECULATION on=""&gt;&lt;BR /&gt;if you are trying to run this sequence in an environment where versions of this file are regularly created&lt;BR /&gt;&lt;SPECULATION off=""&gt;&lt;BR /&gt;then you _MAY_ even be checking "alq" &amp;amp; "EOF" for different files!&lt;BR /&gt;&lt;BR /&gt;I would suggest to first "lock on to" a specific file by using f$search into a symbol, say "fil"&lt;BR /&gt;&lt;BR /&gt;Now, execute both checks, and the conditional rename, on "fil"&lt;BR /&gt;&lt;BR /&gt;.. and if you want some debug to go with it,&lt;BR /&gt;make the if .. rename into an if .. then .. else&lt;BR /&gt;and catch $status.&lt;BR /&gt;&lt;BR /&gt;(I frequently define a symbol DEBUG, with default value "!" and start a debug (display?) line with it.&lt;BR /&gt;Depending on a start param, in debug mode you let DEBUG be a space.)&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;Jan&lt;BR /&gt;&lt;BR /&gt;&lt;/SPECULATION&gt;&lt;/SPECULATION&gt;</description>
      <pubDate>Thu, 10 Feb 2005 10:33:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3482999#M4801</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2005-02-10T10:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in OPENVMS?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3483000#M4802</link>
      <description>I will take out the quotes and see what difference it makes.&lt;BR /&gt;&lt;BR /&gt;I know the rename fails as this procedure runs in batch, produces a log and scans over 200 files.  I can see where it looked at the zero block file but did not rename it.  If the file was locked, an error message would have appeared.</description>
      <pubDate>Thu, 10 Feb 2005 10:33:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3483000#M4802</guid>
      <dc:creator>Randy Armstrong</dc:creator>
      <dc:date>2005-02-10T10:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in OPENVMS?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3483001#M4803</link>
      <description>following up on Jan's suggestion here's what the code would look like to be more secure on working on just 1 version of the file:&lt;BR /&gt;&lt;BR /&gt;$ test_file = f$search("dwh$stats:ssub130c1.dat;-''countc1'")&lt;BR /&gt;$ sts1 = f$file_attributes(test_file,"alq")&lt;BR /&gt;$ sts2 = f$file_attributes(test_file,"eof")&lt;BR /&gt;$ if sts2 .eq. 0 .and. sts1 .eq. 0 then -&lt;BR /&gt;$   rename/log 'test_file' .bad&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Feb 2005 10:47:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3483001#M4803</guid>
      <dc:creator>Robert_Boyd</dc:creator>
      <dc:date>2005-02-10T10:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in OPENVMS?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3483002#M4804</link>
      <description>&lt;BR /&gt;I agree with Jan: The most likely reason for failure is that you are testng two different files.&lt;BR /&gt;&lt;BR /&gt;Let's say you start with file ;2, ;3, ;4 and countc1 = "1"&lt;BR /&gt;So on the ALQ test you test file ;3&lt;BR /&gt;Now imagine file ;5 is created after the ALQ test and the EOF test.&lt;BR /&gt;In that case the EOF test will act upon ;4 !&lt;BR /&gt;&lt;BR /&gt;Solution:&lt;BR /&gt;1) - just test ALQ, the EOF adds no value&lt;BR /&gt;&lt;BR /&gt;2) Establish the file name firmly:&lt;BR /&gt;&lt;BR /&gt;$file = f$search("dwh$stats:ssub130c1.dat;-''countc1'")&lt;BR /&gt;$if file.ne."" &lt;BR /&gt;$then&lt;BR /&gt;$if f$file(file,"alq") + f$file(file,"eof") .eq. 0 then rename/log 'file .bad&lt;BR /&gt;:&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Feb 2005 10:55:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3483002#M4804</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-02-10T10:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in OPENVMS?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3483003#M4805</link>
      <description>Also read this&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=602985" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=602985&lt;/A&gt;</description>
      <pubDate>Thu, 10 Feb 2005 11:11:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3483003#M4805</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2005-02-10T11:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in OPENVMS?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3483004#M4806</link>
      <description>If I interpret the code fragment correctly, the rename command does not necessarily rename the zero block file.  If COUNTC1 = 1, and there is a ;3 and a ;2 version of the file.  The f$file lexicals would check on ;2 (i.e. "dwh$stats:ssub130c1.dat;-''countc1'" = "dwh$stats:ssub130c1.dat;-1"), but the rename command would affect ;3.  I concur with Jan's suggestion.</description>
      <pubDate>Thu, 10 Feb 2005 11:32:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/bug-in-openvms/m-p/3483004#M4806</guid>
      <dc:creator>Garry Fruth</dc:creator>
      <dc:date>2005-02-10T11:32:04Z</dc:date>
    </item>
  </channel>
</rss>

