Home
Services
  OpenVMS
  Windows
  Printers
  PostScript
  Architectures
  Networks
  Embedded Systems
Speaking
Upcoming Events
Newsletter Archive
Presentations
Publications
Technology Demonstration
  Semi-Dynamic WWW Sites
  OpenVMS EXITSTATUS
Bookstore
Contact Us
             
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
We accept MasterCard We accept VISA
We accept American Express We accept Discover
We accept Diners Club

OpenVMS DCL EXITSTATUS: Non-Search Path Logical Names

Often, user questions bring into focus interesting ways to use standard OpenVMS facilities. In a thread entitled "how to DCL custom exit?" on Hewlett Packard's ITRC OpenVMS Forum, Claus Olesen inquired, among other things how one could EXIT a DCL procedure using the name of a standard OpenVMS status code, rather than an actual numeric value.

This question provides for an opportunity to use several OpenVMS features in concert to address a problem that is often, at best, an annoyance. Indeed, OpenVMS has an extensive repetoire of such codes (857 as of OpenVMS Alpha Version 7.3-2). While developers and maintainers often recognize commonly used codes, remembering the numeric values for less-commonly used codes is an inconvenience.

$ EXITSTATUS_VALUE = "SS$_NOSUCHFILE"
$ EXITSTATUS
%SYSTEM-W-NOSUCHFILE, no such file
$ SHOW SYMBOL $STATUS
$STATUS == "%X00000910"
$

EXITSTATUS uses the OpenVMS logical name facilities together with the lexical functions and string substitution features of DCL to provide a tools for developers and maintainers to symbolically return error codes from DCL procedures.

The cost of this is negligible, a handful of bytes of pageable pool. No additional overhead is added to normal logical name lookups, as the logical name table defined for this purpose is not included in the normal logical name lookups done by either RMS or by the $TRNLNM system service.

This implementation consists of two command procedures:

  • EXITSTATUS_STARTUP.COM is run to create and define the contents of the special logical name table, with defineable scope
  • EXITSTATUS_LOGIN.COM is run at login time to define the EXITSTATUS DCL symbol
EXITSTATUS_STARTUP.COM can be run by an individual non-privileged user for their own job or process, on a group basis, or by the system manager at system startup for the entire community.



Download EXITSTATUS (OpenVMS ZIP Archive)

Picture of Robert Gezelter, CDP
Please report problems to the webmaster at: webmaster@removethis.rlgsc.com
copyright 2008, Robert Gezelter, All Rights Reserved