HP OpenVMS Systems

ask the wizard
Content starts here

OpenVMS Condition Return Status Values?

» close window

The Question is:

My application logs tell me that a sys$alloc function returns a code of 36, but
 the reference manuals only refer to SS$_NORMAL or other symbols.  How do I
 match the symbol to the number on my system?

The Answer is :

  OpenVMS uses symbolic constants for its status codes, and the explicit
  coding of the associated binary values is generally discouraged.
  Explicit use of the condition value format is generally encouraged, such
  as testing the low bit of the value.  When this bit is set, the operation
  succeeded.  C on OpenVMS provides the $VMS_STATUS_SUCCESS() macro in the
  sysdef.h definition module for this purpose:
    // signal on failure
    if (!$VMS_STATUS_SUCCESS( RetStat ))
      lib$signal( RetStat );
  You can translate the numeric values to symbolic constants using
  the $putmsg and $getmsg calls, as well as with the EXAMINE/CONDITION
  command in the debugger, as well as searching of the language-specific
  symbol definition files, and via DCL command sequences such as the
$ msg = f$message(36)
$ sho sym msg
  X = "%SYSTEM-F-NOPRIV, insufficient privilege or object protection violation"
$ exit 36
%SYSTEM-F-NOPRIV, insufficient privilege or object protection violation
  The OpenVMS Wizard strongly recommends skimming the OpenVMS Programming
  Concepts manual and the language-specific documentation.  The former
  manual and various language-specific documentation sets are available
  at the OpenVMS website.

answer written or last revised on ( 7-SEP-2001 )

» close window