- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Exiting with error / success codes to VMS Schedule...
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-20-2005 03:24 AM
тАО09-20-2005 03:24 AM
Exiting with error / success codes to VMS Scheduler...
that is run through VMS scheduler on production servers?
$exit $SEVERITY
$exit $STATUS
$exit ($SEVERITY)
$exit ($STATUS)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 03:43 AM
тАО09-20-2005 03:43 AM
Re: Exiting with error / success codes to VMS Scheduler...
$ EXIT
then the current value of $STATUS is used.
If you specify a value then it updates $STATUS with the value you give.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 03:45 AM
тАО09-20-2005 03:45 AM
Re: Exiting with error / success codes to VMS Scheduler...
$ exit $STATUS
or something similar. That will make sure that the true condition code is reported in the accounting file.
If you use
$ exit $SEVERITY
you are trying to turn the severity bits into a condition code - that will not work and produce invalid codes.
$ exit %x2c
%SYSTEM-F-ABORT, abort
$ show symbol $status
$STATUS == "%X0000002C"
$ show symbol $severity
$SEVERITY == "4"
$ exit $status
%SYSTEM-F-ABORT, abort
$ exit $severity
%NONAME-F-NOMSG, Message number 00000004
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 03:47 AM
тАО09-20-2005 03:47 AM
Re: Exiting with error / success codes to VMS Scheduler...
Welcome to the VMS Forum!.
My personal choice would be
$ exit '$status'
Meaning: exit with the VALUE of $status.
This will directly generate the associated message, if it exists and is numeric even.
$severity contains the lower 3 bits of $status, which would result in only "%NOMSG-W-No message", "%NOMSG-E-No nessage" or %NOMSG-F-No message", depending on the seroiusness of the final status. It would prevent potentially interesting and/or informative messages being displayed!
hth,
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 08:37 AM
тАО09-20-2005 08:37 AM
Re: Exiting with error / success codes to VMS Scheduler...
$ exit '$status'
and
$exit
is the former displays the message. The same value is returned in both cases.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 05:52 PM
тАО09-20-2005 05:52 PM
Re: Exiting with error / success codes to VMS Scheduler...
take a look in OpenVMS help
$ HELP EXIT
Very well described there ;o)
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 06:49 PM
тАО09-20-2005 06:49 PM
Re: Exiting with error / success codes to VMS Scheduler...
2) if you do exit after a delete that failed the job will fail because of a warning. So exit 1 after deletes (if noon is set, otherwise the job will abort)
3) often forgotten : subroutines require their own error handling. Default is on error then exit.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 10:33 PM
тАО09-20-2005 10:33 PM
Re: Exiting with error / success codes to VMS Scheduler...
I am using lib$spawn to run a command file from a program and use exit(44) for abort if it fails.
However when I then use lib$get_symbol on $STATUS I always get the same answer of %X'10000001'
How should I be doing this? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 11:20 PM
тАО09-20-2005 11:20 PM
Re: Exiting with error / success codes to VMS Scheduler...
No problem to reply, but I'm not sure, tou'll be able to assign any points to answers to your question.
In DCL, if you use ON ERROR THEN EXIT, ON WARNING.... statements, then you get the right $STATUS value. When you redirect processing to some error handling inside the procedure, you have to save ZSTATUS = $STATUS value immediately after the command execution. The $STATUS value is changing after every command executed.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2005 11:25 PM
тАО09-20-2005 11:25 PM
Re: Exiting with error / success codes to VMS Scheduler...
I haven't read up the details, but I think you want to take a look at the 'completion-status-address' argument of LIB$SPAWN().