Sample Run Of Calltime (Openvms) - Compaq COBOL AAQ2G1FTK User Manual

Compaq computer accessories user manual
Table of Contents

Advertisement

Using Compaq COBOL in the Alpha Common Language Environment
Example 13–5 Sample Run of CALLTIME (OpenVMS)
CALL SYS$ASCTIM
DATE/TIME 11-AUG-2000 09:34:33.45
LENGTH OF RETURNED = 0023
The following example shows how to call the procedure that enables and disables
detection of floating-point underflow (LIB$FLT_UNDER) from a COBOL program.
The format of the LIB$FLT_UNDER procedure is explained in the OpenVMS
RTL Library (LIB$) Manual.
WORKING-STORAGE SECTION.
01
NEW-SET
01
OLD-SET
.
.
.
PROCEDURE DIVISION.
.
.
.
P0.
MOVE 1 TO NEW-SET.
CALL "LIB$FLT_UNDER" USING NEW-SET GIVING OLD-SET.
The following example shows how to call the procedure that finds the first clear
bit in a given bit field (LIB$FFC). This procedure returns a COMP longword
condition value, represented in the example as RETURN-STATUS.
WORKING-STORAGE SECTION.
01
START-POS
01
SIZ
01
BITS
01
POS
01
RETURN-STATUS
.
.
.
PROCEDURE DIVISION.
.
.
.
CALL "LIB$FFC" USING START-POS,
IF RETURN-STATUS IS FAILURE
THEN GO TO error-proc.
The following example uses LIB$SET_SYMBOL to set a value for a DCL symbol
and shows the use of LIB$K_* symbols for arguments and LIB$_* symbols for
return status values.
Using Compaq COBOL in the Alpha Common Language Environment 13–21
PIC S9(9) USAGE IS COMP.
PIC S9(9) USAGE IS COMP.
PIC S9(9) USAGE IS COMP VALUE 0.
PIC S9(9) USAGE IS COMP VALUE 32.
PIC S9(9) USAGE IS COMP VALUE 0.
PIC S9(9) USAGE IS COMP VALUE 0.
PIC S9(9) USAGE IS COMP.
SIZ,
BITS,
POS
GIVING RETURN-STATUS.
13.6 Examples (OpenVMS)

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