 |
» |
|
|
 |
Ask the Wizard Questions
DEC COBOL vs VAX COBOL
The Question is:
A COBOL program with ACCEPT verb used produces
different results when run on both VAX and ALPHA platforms.
On VAX the ACCEPT statement positions the entry point on the next
line of the terminal to get the input. On ALPHA the
entry position is at the top of the screen. All info
previously on the screen remains, with the ACCEPT
entry point overlaid amongst the other details. The result is
mess of characters on the screen. Is there a way to
get the ALPHA to behave like the VAX when the
ACCEPT statement is used.
The Answer is:
As stated in the release notes, any COBOL Format 3
or Format 4 ACCEPT statements, or Format 2 DISPLAY statements in a
program will cause the COBOL RTL to use SMG for screen output. The
customer had not realised that using the clause "WITH CONVERSION" makes
an ACCEPT Format 3 and a DISPLAY Format 2.
There is also a release note for a recent version of COBOL which
explains the screen clearing behaviour. In early implementations, DEC
COBOL would intentionally clear the screen prior to any output. This
was changed in later releases due to customer demand. To clear the
screen, it is now necessary to explicitly clear the screen using the
"ERASE SCREEN" clause of the DISPLAY statement.
This difference between the DEC COBOL RTL and the VAX COBOL RTL
is documented in the DEC COBOL User Manual appendix on compatibility:
------------
If your application uses the Digital extensions to the ACCEPT or
DISPLAY statements, DEC 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
DEC COBOL moves the cursor to the top of the screen to perform the
ACCEPT or DISPLAY, whereas VAX COBOL does not move the cursor.
------------
|