HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
Showing results for 
Search instead for 
Did you mean: 

error messages in hexadecimal

Occasional Advisor

error messages in hexadecimal

Ima a novice VMS COBOL programmer and i need some help in analyzing an hexadecimal error. I have a cobol program submitted in batch and it failed for some reason. When i looked at the log for teh cause , the error is in hexadeimal format. Can somebody please help me how to trace back from the hexadecimal format of error messages. Any help in this regard help would be greatly appreciated.
Trusted Contributor

Re: error messages in hexadecimal

I have not used COBOL in over 30 years, and never on VMS, so there may be COBOL specifics I do not know about.

Was this message something like

%xxxx-x-NOMSG, Message number hhhhhhhhh


In that case the attached command file might be useful. Copy it to your VMS system as FINDMESSAGE.COM, and then

$@findmessage %xhhhhhhhh

where hhhhhhhh is the hexadecimal number from your error message. The "%x" is important.
Steven Schweda
Honored Contributor

Re: error messages in hexadecimal

Any reason not to supply an example to show
what you're talking about? "error is in
hexadecimal format" doesn't tell me much
(except that you know how to spell
hexadecimal, which is nice, but not very
helpful by itself).
Aaron Sakovich
Super Advisor

Re: error messages in hexadecimal

If all you got was a hex number, and that number correctly corresponds to a valid VMS error code, you can get the text for that message by using:

$ exit %b70
%SYSTEM-W-FISH, my hovercraft is full of eels

You'll see the text of the error message associated with that. You can then get assistance with that message (in many circumstances) by issuing the command:

$ help/message fish

Occasional Advisor

Re: error messages in hexadecimal

Hi All,

Thank you so much for all your replies. I didnt put the exact error message or the hex number as it was an actual production error and iam not sure if i can put it in a forum like this. But unfortunately iam not able to replicate the same error in the development environment and my program works fine in the development environment.
Looks like Brown's COM procedure called findmessage works . Let me try again. I did try with help/message but it didnt help me.
Thanks a lot Brown for your script. I will try that in my development environment again. Thank you .
Hein van den Heuvel
Honored Contributor

Re: error messages in hexadecimal

>> I didnt put the exact error message or the hex number as it was an actual production error a

That's a new one... in 30 years of support.
Are you afraid to shame someone, having to admit that the application is not perfect?
Errors happen!

When they do, and you need help, then all details are critical. The exact number, and/or a copy&paste of the exact text. Do not re-type, just copy & paste even if that is more work.

>> I did try with help/message

That works for the bulk of the system provided standard errors, for which a simple $EXIT %xXXXXX, or WRITE SYS$OUTPUT F$MESSAGE (%xXXXX) returns the basic text.
For those you do typically not need Rbrowns script which brute-forces through all message files it can find. Not that there is anything wrong with that..

good luck!

Honored Contributor

Re: error messages in hexadecimal

That's a new one... in 30 years of support.]]]]

Maybe new for you, Hein. Not new for me. I've received (far) weirder over the years.

Ok, here, we can start with %hex 00000001, and guess our way up through the address space.

Or you can post the traceback.

Or you can start with the following:

and work your way back to the trigger yourself.

Steven Schweda
Honored Contributor

Re: error messages in hexadecimal

I always enjoy questions from people who
really don't want answers. They're more fun
than the ones in the HP-UX forum which say,
"I need a shell script which does at all>. Please write it for me."
Honored Contributor

Re: error messages in hexadecimal

FWIW, if the condition value is application-local or if the value returned is from a corrupted register or corrupt stack, then the findmessage tool can return NOMSG or a spurious message. If the value in register R0 when the image exits isn't a condition value, findmessage won't (and can't) produce the desired result.

I just noticed that HP isn't keeping its own message constants entirely straight here; the MMI$ messages do not follow the expected message format nor message allocation for use with registered ($) message values. (Ooops)
John Gillings
Honored Contributor

Re: error messages in hexadecimal

re: help/message

Note that help/message with no parameters will give you help about the condition in $status. For example:

$ directory nofile
%DIRECT-W-NOFILES, no files found
$ help/message

FNF, file not found

Facility: RMS, OpenVMS Record Management Services

Explanation: The specified file does not exist.

User Action: Check the file specification and verify that the device, directory, file name, and file type are all specified correctly. If a logical name is specified, verify the current equivalence assigned to the logical name. If the equivalence is correct, verify that the correct volume is mounted on the specified device and that the file was not inadvertently deleted.

Given a hex condition code, use the sequence:

$ EXIT %xnnnnnn
A crucible of informative mistakes