<?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: $SEVERITY one more time ... in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930614#M32852</link>
    <description>Clearly I was thinking about beverages instead of DCL when I answered Jan ... backup_status got me there, backup_severity was "corrupt" when I got there.&lt;BR /&gt;&lt;BR /&gt;I understand now ... after a few bev's ;-)&lt;BR /&gt;&lt;BR /&gt;Cheers x8,&lt;BR /&gt;Art</description>
    <pubDate>Fri, 30 Sep 2005 21:39:51 GMT</pubDate>
    <dc:creator>Art Wiens</dc:creator>
    <dc:date>2005-09-30T21:39:51Z</dc:date>
    <item>
      <title>$SEVERITY one more time ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930608#M32846</link>
      <description>Why doesn't my command procedure work "as expected"?  I have attached the pertinent bits from the command procedure and the resulting log.  $SEVERITY is supposed to be the last three bits of $STATUS and $STATUS is %X10A38410 ie. the last message logged is a -W-ACCONFLICT so $SEVERITY should be 0.&lt;BR /&gt;&lt;BR /&gt;Clearly I must have a DCL issue , but I can't see it and DCL_CHECK.COM thinks it's ok too.&lt;BR /&gt;&lt;BR /&gt;It's been a rough week.  Two more hours 'till beverage time!!&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Art</description>
      <pubDate>Fri, 30 Sep 2005 15:08:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930608#M32846</guid>
      <dc:creator>Art Wiens</dc:creator>
      <dc:date>2005-09-30T15:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: $SEVERITY one more time ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930609#M32847</link>
      <description>It's VAX/VMS v6.2 .</description>
      <pubDate>Fri, 30 Sep 2005 15:08:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930609#M32847</guid>
      <dc:creator>Art Wiens</dc:creator>
      <dc:date>2005-09-30T15:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: $SEVERITY one more time ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930610#M32848</link>
      <description>Art,&lt;BR /&gt;&lt;BR /&gt;&lt;QUOTE&gt;&lt;BR /&gt;$ backup_status   = $STATUS&lt;BR /&gt;$ backup_severity = $SEVERITY&lt;BR /&gt;&lt;/QUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;I would think backup_severity will receive the severity of the&lt;BR /&gt;" $ backup_status = $status " assignment...&lt;BR /&gt;and, barring DCL table overflow, this will return Success, as the asssignment will only fail if $satus is undefined OR DCL table overflows.&lt;BR /&gt;&lt;BR /&gt;Replace the severity asignment by:&lt;BR /&gt;&lt;BR /&gt;$ backup_severity = backup_status .and. %X7&lt;BR /&gt;&lt;BR /&gt;will do the trick.&lt;BR /&gt;&lt;BR /&gt;hth&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>Fri, 30 Sep 2005 15:27:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930610#M32848</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2005-09-30T15:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: $SEVERITY one more time ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930611#M32849</link>
      <description>I thought about that, but then why does it take the "if not then" path?  And if that's the case, why didn't it fire the OK mail message?&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Art</description>
      <pubDate>Fri, 30 Sep 2005 15:52:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930611#M32849</guid>
      <dc:creator>Art Wiens</dc:creator>
      <dc:date>2005-09-30T15:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: $SEVERITY one more time ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930612#M32850</link>
      <description>I haven't used 6.2 in a long time, perhaps it gets confused about the data type of $severity and makes backup_severity a string instead of an integer, in which case the .eq. tests do strange things.  Try changing the assignement to backup_severity = f$integer($severity).</description>
      <pubDate>Fri, 30 Sep 2005 16:59:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930612#M32850</guid>
      <dc:creator>David Jones_21</dc:creator>
      <dc:date>2005-09-30T16:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: $SEVERITY one more time ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930613#M32851</link>
      <description>Art,&lt;BR /&gt;&lt;BR /&gt;Jan is right. Now, in answer to your last question:&lt;BR /&gt;&lt;BR /&gt;$status &amp;amp; $severity are set upon backup completion and only tell you whether or not backup finished normally or failed to complete.&lt;BR /&gt;&lt;BR /&gt;Your -W- messages didn't cause backup to exit abnormally, so the backup succeeded.&lt;BR /&gt;&lt;BR /&gt;To see why you didn't get any mail, try this:&lt;BR /&gt;&lt;BR /&gt;$ backup_status = %X10A38410&lt;BR /&gt;$ backup_severity = $SEVERITY&lt;BR /&gt;$!&lt;BR /&gt;$ if .NOT. %X10A38410&lt;BR /&gt;$ then&lt;BR /&gt;$ write sys$output -&lt;BR /&gt; "NOT and $severity=" + backup_severity&lt;BR /&gt;$ else&lt;BR /&gt;$ write sys$output "OK"&lt;BR /&gt;$ endif&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Sep 2005 17:00:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930613#M32851</guid>
      <dc:creator>Doug Phillips</dc:creator>
      <dc:date>2005-09-30T17:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: $SEVERITY one more time ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930614#M32852</link>
      <description>Clearly I was thinking about beverages instead of DCL when I answered Jan ... backup_status got me there, backup_severity was "corrupt" when I got there.&lt;BR /&gt;&lt;BR /&gt;I understand now ... after a few bev's ;-)&lt;BR /&gt;&lt;BR /&gt;Cheers x8,&lt;BR /&gt;Art</description>
      <pubDate>Fri, 30 Sep 2005 21:39:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930614#M32852</guid>
      <dc:creator>Art Wiens</dc:creator>
      <dc:date>2005-09-30T21:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: $SEVERITY one more time ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930615#M32853</link>
      <description>The procedure shown is severely broken as fatal backup failures do not sent out mail.&lt;BR /&gt;&lt;BR /&gt;The fact that a simple assignment sets a new $status in DCL is a bit puzzling. It would require a rather creative dcl procedure to exploit that, whereas it would clearly be useful, and possibly natural, to retain status over this trivial built-in.&lt;BR /&gt;This very topic shows this.&lt;BR /&gt;The trouble comes perhaps with complex assignment like a dynamic array: $x = x'y&lt;BR /&gt;Or when using a lexical $x = f$lexical...&lt;BR /&gt;Still...&lt;BR /&gt;&lt;BR /&gt;Some comments:&lt;BR /&gt;&lt;BR /&gt;1) I'm with David on the text/integer concern. When assigning $STATUS you may want to use a substitition and get it in integer form: $x = '$status&lt;BR /&gt;I personally don't like using constructs like: $if string .eq. 1&lt;BR /&gt;It does the right thing, but raises unneeded doubts (as proven by Davids reply).&lt;BR /&gt;Plus, the substitution helps with verification mode (batch logs)&lt;BR /&gt;&lt;BR /&gt;2) The test_status section tests for two explicit non-success values, but does not handle the 3rd possible value: 4 = fatal&lt;BR /&gt;(for example after $BACKUP nonsense: xxx)&lt;BR /&gt;&lt;BR /&gt;So I would prefer to just test for warning else error (or fatal):&lt;BR /&gt;$       if backup_severity .EQ. 0 ! Warning&lt;BR /&gt;$          then&lt;BR /&gt;:&lt;BR /&gt;$          else&lt;BR /&gt;:&lt;BR /&gt;$ endif &lt;BR /&gt;&lt;BR /&gt;3) Instead of 3 repeated nearly identical 'complex' commands which is hard to maintain consider something like this (untested)&lt;BR /&gt;&lt;BR /&gt;$text_status = f$element (backup_severity,"|","with Warnings|OK|with Errors|OKish|with FATAL Error")&lt;BR /&gt;$maill /subj="''nodename' backup completed ''text_status' ''target_device_name'" nl: "smtp%""awiens@domain.com"""&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Sep 2005 22:06:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930615#M32853</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-09-30T22:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: $SEVERITY one more time ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930616#M32854</link>
      <description>"The procedure shown is severely broken as fatal backup failures do not sent out mail."&lt;BR /&gt;&lt;BR /&gt;No it's not, I didn't include it, but there is an on severe_error up top to catch all the "bad things".&lt;BR /&gt;&lt;BR /&gt;The rest of your suggestions are very good!  I'll change up the procedure to incorporate all the suggested changes.&lt;BR /&gt;&lt;BR /&gt;Thanks guys!&lt;BR /&gt;&lt;BR /&gt;Art</description>
      <pubDate>Sat, 01 Oct 2005 09:52:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930616#M32854</guid>
      <dc:creator>Art Wiens</dc:creator>
      <dc:date>2005-10-01T09:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: $SEVERITY one more time ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930617#M32855</link>
      <description>Ok, fair enough. That part of script was not shown in the include file.&lt;BR /&gt;&lt;BR /&gt;And, fwiw, I do believe it would merrit a comment in the 'test_status' section mentioning 'can not get here with sev=4: fatal errors'.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Oct 2005 07:24:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930617#M32855</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-10-03T07:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: $SEVERITY one more time ...</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930618#M32856</link>
      <description>Jan hit it on the head, my backup_severity symbol reflects the correct symbol assignment of backup_status not the severity of the previous backup command.  Using the " backup_status .and. %X7 " suggested is the solution.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Art</description>
      <pubDate>Mon, 03 Oct 2005 10:39:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/severity-one-more-time/m-p/4930618#M32856</guid>
      <dc:creator>Art Wiens</dc:creator>
      <dc:date>2005-10-03T10:39:38Z</dc:date>
    </item>
  </channel>
</rss>

