[Info-vax] Suppressing DCL exit status messages
Ian Miller
gxys at uk2.net
Tue Sep 12 09:47:01 EDT 2023
On Tuesday, September 12, 2023 at 1:34:40 PM UTC+1, Simon Clubley wrote:
> On 2023-09-11, gah4 <ga... at u.washington.edu> wrote:
> >
> > It was a C program that I wrote, and that had exit(8); in it.
> >
> > There was no access violation.
> >
>
> I am surprised nobody told you the error message could be suppressed
> if you set the right bit in the exit status you return to DCL:
>
> $ exit 8
> %SYSTEM-W-ACCVIO, access violation, reason mask=00, virtual address=0000000000000008, PC=000000007AF0D9F0, PS=00000000
> $ write sys$output $status
> %X00000008
>
> $ exit %x10000008
> $ write sys$output $status
> %X10000008
>
> Note that it's that specific bit which needs setting as you still get
> the message in this case:
>
> $ exit %x40000008
> %SYSTEM-W-ACCVIO, access violation, reason mask=00, virtual address=0000000040000008, PC=000000007AF0D9F0, PS=00000000
> $ write sys$output $status
> %X40000008
>
> You can mask off the top 4 bits (the internal control flags) to
> extract out the actual number your program returned to your DCL script.
>
> Not sure where I found this out because it's not in the manuals
> I just checked.
>
> Simon.
>
> --
> Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
> Walking destinations on a map are further away than they appear.
See the OpenVMS Calling Standard chapter on OpenVMS Conditions where all this is documented https://docs.vmssoftware.com/vsi-openvms-calling-standard/#VMSCONDITIONS_CHAP
More information about the Info-vax
mailing list