- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- OpenVMS DCL Error Handling
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
тАО03-05-2006 09:29 PM
тАО03-05-2006 09:29 PM
I'm "very" new to OpenVMS. I have a number od DCL scripts that do backups and copies etc. We also employ an SNMP based agent that provides a user trap facility based on a command procedure. All I need to pass this procedure is a single parameter. eg.
$ @send_severity_trap "%SYSTEM-F-NOLOGNAM, no logical name match".
This prcedure tests for the severity and then writes to a mailbox.
My question is simply, what is the simplest way to implement this? At the top of my script should I set error handling at a specific desired minimum severity eg. ON ERROR THEN GOTO ERR1
Then at ERR1: what should I pass to the procedure send_severity_trap.com?
Regards
Graham
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2006 09:55 PM
тАО03-05-2006 09:55 PM
Re: OpenVMS DCL Error Handling
You can use ON ERROR (and its related commands, ON WARNING, ON SEVERE_ERROR) to trap these conditions.
However, it may not be optimal. The problem is that DCL does not report WHERE or WHAT generated the error. For reporting that a problem occurred, it may be adequate. For troubleshooting, the results are limited.
This also presumes that your script does not invoke other scripts.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2006 10:15 PM
тАО03-05-2006 10:15 PM
Re: OpenVMS DCL Error Handling
$Abort:
$ stat=$status
$ reason=f$mes(status) + "(''status')"
$ @send "''reason'"
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2006 10:36 PM
тАО03-05-2006 10:36 PM
Re: OpenVMS DCL Error Handling
The on error is reset when it is executed (reset means back to on error then exit".
Subroutines and files executed via @ also require "on error" or will have the default.
If set noon is used, make sure set on is done again in all cases. Otherwise the error will be ignored.
In big scripts, I regularly set the symbol "place" to a value and display it in the abort routine. Makes it easier to debug.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2006 11:40 PM
тАО03-05-2006 11:40 PM
Re: OpenVMS DCL Error Handling
As someone new to VMS, it sounds like you are doing great. Welcome!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2006 12:50 AM
тАО03-06-2006 12:50 AM
Re: OpenVMS DCL Error Handling
Details on the book are at
http://www.amazon.com/exec/obidos/external-search?search-type=ss&tag=tru64org&keyword=DCL&index=books
See also DCL Dialogue Online
http://www.kgb.com/dcl.html
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2006 05:52 PM
тАО03-06-2006 05:52 PM
Re: OpenVMS DCL Error Handling
Use dcl_check (freeware) to verify if the syntax is (probaly) correct. E.g. goto labels that don't exists are verified.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2006 06:10 PM
тАО03-06-2006 06:10 PM
Re: OpenVMS DCL Error Handling
I seem to have something working. The majority of scripts are returning fine ...
(Successful. %SYSTEM-S-NORMAL, normal successful completion ). These scripts usually only do copies etc. The client wants this -S- severity reported since NNM must show green in the "VMS Jobs" alarm category unless there is a failed or problematic job.
However when an Oracle hotbackup script runs it returns the following:
(Warning. %BACKUP-W-NOMSG, Message number 10A38410 ) My question is, how do I now interpret the Message Number?
My call is as follows:
@send_severity_trap.com "''F$MESSAGE($status)' : Msg source = ec_db_hotbkup_pm.com"
Regards
Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2006 08:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2006 09:17 PM
тАО03-06-2006 09:17 PM
Re: OpenVMS DCL Error Handling
Yes, I would have expected that message since when Oracle is in hotbackup mode the files will be available to other users for writing.
Regards
Graham