Calling Routines; Determining The Type Of Call (Openvms) - Compaq COBOL AAQ2G1FTK User Manual

Compaq computer accessories user manual
Table of Contents

Advertisement

Using Compaq COBOL in the Alpha Common Language Environment
Table 13–3 (Cont.) System Services (OpenVMS)
Group
Condition Handling
Event Flag
Information
Input/Output
Lock Management
Logical Names
Memory
Management
Process Control
Security
Timer and Time
Conversion

13.4 Calling Routines

The basic steps for calling routines are the same whether you are calling a routine
(subprogram) written in COBOL, a routine written in some other language, a
system service, or a Run-Time Library routine. There are five steps required to
call any system routine:
1. Determining the type of call
2. Defining the arguments
3. Calling the routine or service
4. Checking the condition value, if applicable
5. Locating the result
The following sections outline the steps for calling non-COBOL routines.

13.4.1 Determining the Type of Call (OpenVMS)

Before you call an external routine, you must first determine whether the call
should be a procedure call or a function call. In COBOL, a routine that does not
return a value should be called as a procedure call. A routine that returns a
value should be called as a function call. Thus, a function call returns one of the
following:
A function value (a COMP integer, COMP-1, or COMP-2 number). For
example, on OpenVMS Alpha the call LIB$INDEX returns an integer value.
A return status, which is a longword (PIC 9(5) to 9(9) USAGE IS COMP)
condition value that indicates the program has either successfully executed or
failed. For example, on OpenVMS Alpha, LIB$GET_INPUT returns a return
status.
13.3 OpenVMS Alpha System Routines (OpenVMS)
Types of Tasks Performed
Designates condition handlers for special purposes
Clears, sets, reads, and waits for event flags, and associates with
event flag clusters
Returns information about the system, queues, jobs, processes,
locks, and devices
Performs I/O directly, without going through RMS
Enables processes to coordinate access to shareable system
resources
Provides methods of accessing and maintaining pairs of character-
string logical names and equivalence names
Increases or decreases available virtual memory, controls paging
and swapping, and creates and accesses shareable files of code or
data
Creates, deletes, and controls execution of processes
Enhances the security of OpenVMS Alpha systems
Schedules events and obtains and formats binary time values
Using Compaq COBOL in the Alpha Common Language Environment 13–5

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?

Questions and answers

Table of Contents