Page 1 of 1

OpenVMS status codes

Posted: Sat Jul 20, 2019 12:23 pm
by ajbrehm
Is there a seminal list of C API status codes somewhere?

Re: OpenVMS status codes

Posted: Mon Jul 22, 2019 1:10 am
by martinv
Terse questions beget terse answers. Which API and which list do you refer to?

The return values for a C API function call are listed in the function's description in the HP C Run-Time Library Reference Manual. The list of C error numbers is in SYS$COMMON:[DECC$LIB.REFERENCE.DECC$RTLDEF]ERRNO.H.

The condition codes returned by a VMS system library function are listed in the respective reference manual. These are hard to come by right now, unfortunately. You'd have to go through the HPE OpenVMS documentation landing page. Only symbolized condition codes are used throughout VMS. Their numeric values can be found in various SYS$COMMON:[DECC$LIB.REFERENCE.SYS$STARLET_C]*DEF.H files.

Re: OpenVMS status codes

Posted: Tue Jul 21, 2020 10:49 am
by tlovern
a quick and dirty method, is to create a simple file, like: SS_CODES.C
put a single line in the file: #include <ssdef>

then do a cc/noobj/list/show=all ss_codes.c

this will give you a listing of all the values from SSDEF

repeat as required.

you can put these listing in a directory that you can search, edit, whatever.

not the most elegant solution, but sometimes it is the quickest way to find a value.

Re: OpenVMS status codes

Posted: Fri Jul 24, 2020 9:07 am
by mw
FWIW:

Code: Select all

$ if p1 .eqs. ""
$ then
$     write sys$output "supply a macro name, for example $SSDEF, $RABDEF ..."
$     exit
$ endif
$ fac = p1 - "$" - "DEF"
$ pipe (write sys$output "      ''p1'   GLOBAL" ; write sys$output "     .end" ) -
        | macro/noobject/list=sys$output/show=expansions sys$pipe -
        | search sys$pipe 'fac'$,==/match=and
If you want and if you have, pipe it through GNV awk with"{print $1, $4}". And/or redirect the output to a file, or append a "| search sys$pipe" if you are looking for a name or a value.

PS: I wonder why in the previous reply the #include was used without a full file specification. I know, this works on VMS, but ...