- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: DCLAST routine doesn't run at AST level?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2008 07:25 AM
тАО09-04-2008 07:25 AM
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.
http://www.openvms.compaq.com/doc/83FINAL/4527/4527pro_034.html#jun_174
http://www.openvms.compaq.com/doc/83FINAL/4527/4527pro_100.html#jun_473
#include
#include
#include
void ast(int *foo)
{
int ast_status;
ast_status = sys$setast(0);
printf("ast_status = %x, wasclr = %x, wasset = %x\n", ast_status, SS$_WASCLR, SS$_WASSET);
if (SS$_WASSET == ast_status) sys$setast(1);
*foo = 1;
}
main()
{
int bar = 0;
int status;
status = sys$dclast(&ast, &bar, 0);
printf("bar = %x, status = %x\n", bar, status);
}
$ cc/version
HP C V7.1-011 on OpenVMS IA64 V8.3-1H1
$ r dclast_test
ast_status = 9, wasclr = 1, wasset = 9
bar = 1, status = 1
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2008 07:47 AM
тАО09-04-2008 07:47 AM
SolutionReading your citations from the manuals, it is not clear to me from the documentation how SYS$SETAST behaves from with AST state.
Have you tried LIB$AST_IN_PROG? [see
http://h71000.www7.hp.com/doc/82final/5932/5932pro_002.html#index_x_19 ]
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2008 08:13 AM
тАО09-04-2008 08:13 AM
Re: DCLAST routine doesn't run at AST level?
This stuff works.
The OpenVMS world would fall apart if it did not.
Just bad documentation interpretation.
setast only enables and disables, and reports the prior enabling state.
It does not report on the current run state.
You may want to look GETJPI : JPI$_ASTACT
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.
It may be more fun to do in the main line:
$SETAST 0
print "about to DCLAST"
$DCLAST
print "AST declared"
$SETAST 1
print "AST Enabled"
The message from the AST function should come between AST enabled and declared.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2008 08:23 AM
тАО09-04-2008 08:23 AM
Re: DCLAST routine doesn't run at AST level?
Thanks for the pointers to the what I really want to determine whether or not my code is at AST level.
Maybe someone will improve the documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2008 10:33 AM
тАО09-04-2008 10:33 AM
Re: DCLAST routine doesn't run at AST level?
--
Only if you make it formally known that there's a problem.
Given the lack of resources, it would help if you sent in a suggested clarification or modification to the section(s) that need help.
That way, the few documentation writers that are left won't have to badger already-overworked engineers to spend time researching, testing, etc . . .
Yeah, that sounds pretty harsh, but it's the reality of the situation.
-- Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2008 01:36 AM
тАО09-05-2008 01:36 AM
Re: DCLAST routine doesn't run at AST level?
As Robert suggested, LIB$AST_IN_PROG is the routine to use to determine AST status.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2008 05:41 AM
тАО09-05-2008 05:41 AM
Re: DCLAST routine doesn't run at AST level?
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.