<?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: DCLAST routine doesn't run at AST level? in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128140#M25942</link>
    <description>Richard,&lt;BR /&gt;&lt;BR /&gt;Reading your citations from the manuals, it is not clear to me from the documentation how SYS$SETAST behaves from with AST state.&lt;BR /&gt;&lt;BR /&gt;Have you tried LIB$AST_IN_PROG? [see &lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/82final/5932/5932pro_002.html#index_x_19" target="_blank"&gt;http://h71000.www7.hp.com/doc/82final/5932/5932pro_002.html#index_x_19&lt;/A&gt; ]&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
    <pubDate>Thu, 04 Sep 2008 14:47:33 GMT</pubDate>
    <dc:creator>Robert Gezelter</dc:creator>
    <dc:date>2008-09-04T14:47:33Z</dc:date>
    <item>
      <title>DCLAST routine doesn't run at AST level?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128139#M25941</link>
      <description>On a RX2600 with VMS 8.3-1H1 and all patches available (as of yesterday) it appears that the routine specified in $DCLAST does NOT execute at AST level.&lt;BR /&gt;&lt;BR /&gt;I was testing that some code would properly complete in AST mode yesterday and figured that the easiest was was to write a test program that called the routine by doing a SYS$DCLAST.  After a bit of finding bugs in the code that I was testing I determined that the routine called by the "AST" passed to DCLAST was NOT executing at AST level.  I pared the program down to the minimum and used SYS$SETAST to make sure that it was at AST level and display what it was before disabling ASTs.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.openvms.compaq.com/doc/83FINAL/4527/4527pro_034.html#jun_174" target="_blank"&gt;http://www.openvms.compaq.com/doc/83FINAL/4527/4527pro_034.html#jun_174&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.openvms.compaq.com/doc/83FINAL/4527/4527pro_100.html#jun_473" target="_blank"&gt;http://www.openvms.compaq.com/doc/83FINAL/4527/4527pro_100.html#jun_473&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;STARLET.H&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;SSDEF.H&gt;&lt;BR /&gt;&lt;BR /&gt;void ast(int *foo)&lt;BR /&gt;{&lt;BR /&gt;    int ast_status;&lt;BR /&gt;&lt;BR /&gt;    ast_status = sys$setast(0);&lt;BR /&gt;    printf("ast_status = %x, wasclr = %x, wasset = %x\n", ast_status, SS$_WASCLR, SS$_WASSET);&lt;BR /&gt;    if (SS$_WASSET == ast_status) sys$setast(1);&lt;BR /&gt;    *foo = 1;&lt;BR /&gt;}&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;    int bar = 0;&lt;BR /&gt;    int status;&lt;BR /&gt;    status = sys$dclast(&amp;amp;ast, &amp;amp;bar, 0);&lt;BR /&gt;    printf("bar = %x, status = %x\n", bar, status);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;$ cc/version&lt;BR /&gt;HP C V7.1-011 on OpenVMS IA64 V8.3-1H1&lt;BR /&gt;&lt;BR /&gt;$ r dclast_test&lt;BR /&gt;ast_status = 9, wasclr = 1, wasset = 9&lt;BR /&gt;bar = 1, status = 1&lt;/SSDEF.H&gt;&lt;/STDIO.H&gt;&lt;/STARLET.H&gt;</description>
      <pubDate>Thu, 04 Sep 2008 14:25:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128139#M25941</guid>
      <dc:creator>Richard Whalen</dc:creator>
      <dc:date>2008-09-04T14:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: DCLAST routine doesn't run at AST level?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128140#M25942</link>
      <description>Richard,&lt;BR /&gt;&lt;BR /&gt;Reading your citations from the manuals, it is not clear to me from the documentation how SYS$SETAST behaves from with AST state.&lt;BR /&gt;&lt;BR /&gt;Have you tried LIB$AST_IN_PROG? [see &lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/82final/5932/5932pro_002.html#index_x_19" target="_blank"&gt;http://h71000.www7.hp.com/doc/82final/5932/5932pro_002.html#index_x_19&lt;/A&gt; ]&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Thu, 04 Sep 2008 14:47:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128140#M25942</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2008-09-04T14:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: DCLAST routine doesn't run at AST level?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128141#M25943</link>
      <description>Oh, yeah of little faith !&lt;BR /&gt;This stuff works. &lt;BR /&gt;The OpenVMS world would fall apart if it did not.&lt;BR /&gt;&lt;BR /&gt;Just bad documentation interpretation.&lt;BR /&gt;&lt;BR /&gt;setast only enables and disables, and reports the prior enabling state. &lt;BR /&gt;It does not report on the current run state.&lt;BR /&gt;&lt;BR /&gt;You may want to look GETJPI : JPI$_ASTACT&lt;BR /&gt;&lt;BR /&gt;Of course it is a rather nasty test program in that it requests an async service but the subsequent coding relies on synchroneous completion without synchronization. Yuck.&lt;BR /&gt;&lt;BR /&gt;It may be more fun to do in the main line:&lt;BR /&gt;&lt;BR /&gt;$SETAST 0&lt;BR /&gt;print "about to DCLAST"&lt;BR /&gt;$DCLAST &lt;BR /&gt;print "AST declared"&lt;BR /&gt;$SETAST 1&lt;BR /&gt;print "AST Enabled"&lt;BR /&gt;&lt;BR /&gt;The message from the AST function should come between AST enabled and declared.&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Sep 2008 15:13:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128141#M25943</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-09-04T15:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: DCLAST routine doesn't run at AST level?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128142#M25944</link>
      <description>I expected DCLAST to make the routine run at AST level, and I would expect many things to be wrong if it didn't.&lt;BR /&gt;&lt;BR /&gt;Thanks for the pointers to the what I really want to determine whether or not my code is at AST level.&lt;BR /&gt;&lt;BR /&gt;Maybe someone will improve the documentation.</description>
      <pubDate>Thu, 04 Sep 2008 15:23:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128142#M25944</guid>
      <dc:creator>Richard Whalen</dc:creator>
      <dc:date>2008-09-04T15:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: DCLAST routine doesn't run at AST level?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128143#M25945</link>
      <description>Maybe someone will improve the documentation.&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;&lt;BR /&gt;Only if you make it formally known that there's a problem.&lt;BR /&gt;&lt;BR /&gt;Given the lack of resources, it would help if you sent in a suggested clarification or modification to the section(s) that need help.&lt;BR /&gt;&lt;BR /&gt;That way, the few documentation writers that are left won't have to badger already-overworked engineers to spend time researching, testing, etc . . .&lt;BR /&gt;&lt;BR /&gt;Yeah, that sounds pretty harsh, but it's the reality of the situation.&lt;BR /&gt;&lt;BR /&gt;-- Rob</description>
      <pubDate>Thu, 04 Sep 2008 17:33:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128143#M25945</guid>
      <dc:creator>Robert Brooks_1</dc:creator>
      <dc:date>2008-09-04T17:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: DCLAST routine doesn't run at AST level?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128144#M25946</link>
      <description>Richard,&lt;BR /&gt;&lt;BR /&gt;  As Robert suggested, LIB$AST_IN_PROG is the routine to use to determine AST status. &lt;BR /&gt;&lt;BR /&gt;  Just a comment on debugging with these routines. As your code shows, the value of SS$_WASSET is 9. In hindsight, this was a very silly choice. I've seen many cases where people test return status against SS$_NORMAL, assuming anything else is a failure. They then translate SS$_WASSET as if it were an error, and get SYSTEM-S-ACCVIO! The "S" is very easy to overlook.</description>
      <pubDate>Fri, 05 Sep 2008 08:36:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128144#M25946</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2008-09-05T08:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: DCLAST routine doesn't run at AST level?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128145#M25947</link>
      <description>Thanks to all.&lt;BR /&gt;&lt;BR /&gt;I'll see what I can do about submitting some improved wording for the documentation, but resources are tight here too, so it may take a while.</description>
      <pubDate>Fri, 05 Sep 2008 12:41:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dclast-routine-doesn-t-run-at-ast-level/m-p/5128145#M25947</guid>
      <dc:creator>Richard Whalen</dc:creator>
      <dc:date>2008-09-05T12:41:21Z</dc:date>
    </item>
  </channel>
</rss>

