OpenVMS status codes

Post Reply
User avatar

Topic author
ajbrehm
Valued Contributor
Posts: 62
Joined: Sun Jun 16, 2019 7:55 am
Reputation: 6
Location: Zurich
Status: Offline
Contact:

OpenVMS status codes

Post by ajbrehm » Sat Jul 20, 2019 12:23 pm

Is there a seminal list of C API status codes somewhere?

User avatar

martinv
Master
Posts: 101
Joined: Fri Jun 14, 2019 11:05 pm
Reputation: 0
Location: Goslar, Germany
Status: Online
Contact:

Re: OpenVMS status codes

Post by martinv » Mon Jul 22, 2019 1:10 am

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.
Last edited by martinv on Wed Jul 24, 2019 7:28 am, edited 1 time in total.
Working hard for something we don't care about is called stress;
working hard for something we love is called passion.
(Simon Sinek)

User avatar

tlovern
Active Contributor
Posts: 38
Joined: Tue Jul 21, 2020 10:44 am
Reputation: 0
Status: Offline

Re: OpenVMS status codes

Post by tlovern » Tue Jul 21, 2020 10:49 am

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.


mw
Member
Posts: 8
Joined: Mon Jul 06, 2020 4:38 am
Reputation: 0
Status: Offline

Re: OpenVMS status codes

Post by mw » Fri Jul 24, 2020 9:07 am

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 ...

Post Reply