Compaq COBOL for OpenVMS VAXand Compaq COBOL Compatibility and Migration
B.4 Compaq COBOL and Compaq COBOL for OpenVMS VAXBehavior Differences
For example, in the case of a file that was not successfully opened, any
subsequent Compaq COBOL record operation (READ, WRITE, START,DELETE,
REWRITE, or UNLOCK) fails without invoking RMS. Thus, the values placed in
the RMS special registers for the failed OPEN operation remain unchanged for
the subsequent failed record operations on the same file. The same subsequent
record operations on Compaq COBOL for OpenVMS VAXalways invoke RMS,
which attempts the undefined operations and returns new values to the RMS
special registers.
There is one other instance when the RMS special registers can contain different
values for Compaq COBOL and Compaq COBOL for OpenVMS VAXapplications.
Upon the successful completion of an RMS operation on a Compaq COBOL file,
the RMS special registers always contain RMS completion codes. Upon the
successful completion of an RMS operation on a Compaq COBOL for OpenVMS
VAXfile, the RMS special registers usually contain RMS completion codes, but
occasionally these registers may contain COBOL-specific completion codes.
Difference from Compaq COBOL for OpenVMS VAX
Compaq COBOL does not allow the following compiler-generated variables to be
declared as user variables, as Compaq COBOL for OpenVMS VAXdoes:
RMS_STS
RMS_STV
RMS_CURRENT_STS
RMS_CURRENT_STV
B.4.10 Calling Shareable Images
On OpenVMS, Compaq COBOL and Compaq COBOL for OpenVMS VAXexhibit
different behavior when calling a subprogram installed as a shareable image.
With Compaq COBOL, the program name you specify in a CALL statement can
be either a literal or a data-name. (The same is true for the CANCEL statement.)
With Compaq COBOL for OpenVMS VAX,the program name you specify in a
CALL (or CANCEL) statement must be a literal. In addition, Compaq COBOL for
OpenVMS VAXprograms installed as shareable images cannot contain external
files. (See Chapter 1 and OpenVMS Linker Utility Manual for more information
about shareable images.)
On Windows NT and Tru64 UNIX systems, Compaq COBOL exhibits behavior
more like Compaq COBOL for OpenVMS VAXwith regard to shared objects.
(Shared objects are the Windows NT and Tru64 UNIXequivalent to OpenVMS
shared images.) For more information, see Chapter 12, Interprogram
Communication.
B.4.11 Sharing Common Blocks (OpenVMS)
On OpenVMS, to prevent problems when you link a Compaq COBOL program
and want to share a common block between processes, you should set the PSECT
attribute to SHR (the defaults are: SHR on OpenVMS Alpha systems, NOSHR
on OpenVMS VAXsystems). Also, you should add a SYMBOL_VECTOR to the
linker options file of the shareable image, as follows:
SYMBOL_VECTOR = (psect-name = PSECT)
For more information, see the OpenVMS Linker Utility Manual.
B22 Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration