Library Return Status And Condition Value Symbols; (Openvms); Locating The Result (Openvms); Establishing And Removing User Condition Handlers (Openvms) - Compaq COBOL AAQ2G1FTK User Manual

Compaq computer accessories user manual
Table of Contents

Advertisement

Using Compaq COBOL in the Alpha Common Language Environment
13.4.5.1 Library Return Status and Condition Value Symbols (OpenVMS)
Library return status and condition value symbols have the following general
form:
fac$_abcmnoxyz
where:
fac
is a 2- or 3-letter facility symbol (LIB, MTH, STR, OTS, BAS, COB, FOR, SS).
abc
are the first 3 letters of the first word of the associated message.
mno
are the first 3 letters of the next word.
xyz
are the first 3 letters of the third word, if any.
Articles and prepositions are not considered significant words in this format. If
a significant word is only two letters long, an underscore character is used to
fill out the third space. The OpenVMS Alpha normal or success code is used to
indicate successful completion. Some examples of this code are as follows:
RETURN Status
LIB$_INSVIRMEM
FOR$_NO_SUCDEV
MTH$_FLOOVEMAT
BAS$_SUBOUTRAN

13.4.6 Locating the Result (OpenVMS)

Once you have defined the arguments, called the procedure, and checked the
condition value, you are ready to locate the result. To find out where the result is
returned, look at the description of the system routine you are calling.
For example, in the following call to MTH$ACOS the result is written into the
variable COS:
01 ARG-CODE PIC S9(9) COMP VALUE 1.
01 COS
CALL "MTH$ACOS" USING BY REFERENCE ARG-CODE GIVING COS.
This result is described in the OpenVMS Alpha documentation on system services
and Run-Time Library routines, under the description of the system routine.
13.5 Establishing and Removing User Condition Handlers

(OpenVMS)

To establish a user condition handler, call the LIB$ESTABLISH routine.
The form of the call is as follows:
CALL LIB$ESTABLISH USING BY VALUE new-handler GIVING old-handler
Meaning
Insufficient virtual memory
No such device
Floating overflow in Math Library procedure
Subscript out of range
COMP1 VALUE 0.
.
.
.
Using Compaq COBOL in the Alpha Common Language Environment 13–15
13.4 Calling Routines

Advertisement

Table of Contents
loading

Table of Contents