Compaq COBOL AAQ2G1FTK User Manual

Page 551

Advertising
background image

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration

B.4 Compaq COBOL and Compaq COBOL for OpenVMS VAX Behavior Differences

When your terminal is set to no-wrap mode and you display an item whose
characters extend past the edge of the screen, all characters past the
rightmost column are truncated. For example, if you specify a display of
‘‘1234’’ at column 79 on an 80-column screen, Compaq COBOL will display 12.
By contrast, Compaq COBOL for OpenVMS VAX overstrikes the character
in the rightmost column. Using the same example, Compaq COBOL for
OpenVMS VAX will display 14.

If your application uses the Compaq extensions to the ACCEPT or DISPLAY
statements, Compaq COBOL positions the cursor in the upper left corner of
the screen prior to the execution of the first ACCEPT or DISPLAY statement.

This difference is clearly shown when the first ACCEPT or DISPLAY
statement does not contain the LINE and COLUMN clauses. In this case
Compaq COBOL moves the cursor to the top of the screen to perform the
ACCEPT or DISPLAY, whereas Compaq COBOL for OpenVMS VAX does not
move the cursor.

Screen update behavior is not identical on Compaq COBOL and Compaq COBOL
for OpenVMS VAX, and they sometimes use different escape sequences for
ACCEPT and DISPLAY to accomplish similar screen formatting.

If you attempt to use extended ACCEPT/DISPLAY with input redirected from a
file or output redirected to a file, the operation differs between Compaq COBOL
for OpenVMS VAX and Compaq COBOL. In general, the Compaq COBOL RTL
attempts to use ANSI ACCEPT/DISPLAY to handle all ACCEPT and DISPLAY
statements in this situation. For example, if you use DISPLAY AT LINE or
ACCEPT DEFAULT, the Compaq COBOL RTL will ignore the extensions
(that is, LINE or DEFAULT) if you redirect output to a file or input from a
file. The Compaq COBOL RTL for OpenVMS VAX ignores some, but not all,
ACCEPT/DISPLAY extensions when input is redirected from a file or output is
redirected to a file.

END-DISPLAY Difference

In Compaq COBOL, a DISPLAY statement in an ON EXCEPTION for an
ACCEPT statement must be terminated, with, for example, END-DISPLAY.
END-DISPLAY is supported for all formats of DISPLAY.

In Compaq COBOL for OpenVMS VAX, END-DISPLAY is not supported. If you
convert code with ACCEPT ON EXCEPTION to handle DISPLAY on both VAX
and Alpha, you need to PERFORM a paragraph with the DISPLAY from the ON
EXCEPTION processing in the ACCEPT.

For more information about ACCEPT and DISPLAY, including sample programs,
see Chapter 11, Using ACCEPT and DISPLAY Statements for Input/Output and
Video Forms.

B.4.4.2 LINAGE Clause

Compaq COBOL and Compaq COBOL for OpenVMS VAX exhibit different
behavior when handling large values for the LINAGE statement. If the line
count for the ADVANCING clause of the WRITE statement is larger than 127,
Compaq COBOL advances one line. Compaq COBOL for OpenVMS VAX results
are undefined.

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration B–17

Advertising