[Info-vax] completion status from LIB$SPAWN

jbriggs444 jbriggs444 at gmail.com
Thu Apr 26 09:05:42 EDT 2012


On Apr 26, 8:13 am, StGallen <sengupta.su... at gmail.com> wrote:
> All,
>
> I am having problem getting the completion status from LIB$SPAWN. DEC BASIC 1.4.
>
> I have prepared the below test program. SPAWN_STATUS returns a SUCCESS after 1st call to LIB$SPAWN. The 2nd calls returns 268435457 for SPAWN_STATUS. Will someone help me understand why this might be the case?

VMS status codes consist of multiple fields.  When you
test a status code for a specific value, you are doing the
wrong thing.

This particular code value, 268435457 is 0x10000001

That first bit is in position 28.  Its meaning is, roughly:
"This error message has already been reported to the
user, do not print it again".

If memory serves, the bit position is symbolically
named SS$V_INHIB_MSG

>From a handy web page that I just googled up:

The following list describes the division of this bit field:

control bits (31-28)
Define special action(s) to be taken. At present, only bit 28 is used.
When set, it inhibits the printing of the message associated with the
return status value at image exit. Bits 29 through 31 are reserved for
future use by Compaq and must be 0.

facility number (27-16)
A unique value assigned to the system component, or facility, that is
returning the status value. Within this field, bit 27 has a special
significance. If bit 27 is clear, the facility is a Compaq facility:
the remaining value in the facility number field is a number assigned
by the operating system. If bit 27 is set, the number indicates a
customer-defined facility.

message number (15-3)
An identification number that specifically describes the return status
or condition. Within this field, bit 15 has a special significance. If
bit 15 is set, the message number is unique to the facility issuing
the message. If bit 15 is clear, the message is issued by more than
one system facility.

severity (2-0)
A numeric value indicating the severity of the return status. Table
3-13 shows the possible values in these three bits, and their
meanings.

The bottom line is that if you want to test for a specific error code,
you should ignore bit positions 28 through 31.

There is a run time library function, lib$match_cond that can do
this sort of thing for you (if I remember right, it will also ignore
the facility code when appropriate).

Note that this is from memory -- I haven't coded on VMS for
a decade or so.



More information about the Info-vax mailing list