Compaq COBOL AAQ2G1FTK User Manual

Page 559

Advertising
background image

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration

B.5 Compaq COBOL Differences Across Operating Systems

B.5.1 REWRITE

A REWRITE operation for an ISAM file is dependent on whether the
DUPLICATES clause for the primary key is specified. There is an ambiguity
when DUPLICATES is specified in one way at the time a file is created, and
another way when it is reopened (a program should use the same declarations).
Both Compaq COBOL for OpenVMS VAX and Compaq COBOL for OpenVMS
Alpha use the specification of the current program. So, if DUPLICATES was
specified for the primary key when a file was created, but not when reopened by
the current program, the behavior will be as if DUPLICATES were not allowed.

Compaq COBOL on Windows NT and on Tru64 UNIX issues a severe run-time
error if there is a mismatch, unless relax key checking (the

-rkc

flag) is specified,

in which case the behavior is inconsistent. In many cases, you will get the
behavior of the specification when the file was created, but you should not rely on
this.

B.5.2 File Sharing and Record Locking

With Compaq COBOL on Windows NT and on Tru64 UNIX, certain file-sharing
and record-locking operations may behave differently from the same operations
on Compaq COBOL on OpenVMS Alpha. Compaq COBOL on Windows NT and
Tru64 UNIX issues warning diagnostics where applicable.

File sharing for sequential and relative files on all systems remains
essentially the same. One notable exception is REGARDLESS, which is
not supported on Windows NT systems.

File sharing for indexed files has the following limitation: The OPEN
statement ALLOWING READERS phrase is minimally supported for indexed
files on Windows NT and Tru64 UNIX systems. Using the ALLOWING
READERS phrase for indexed files is not recommended.

File-sharing protocols for all file organizations are in effect for Windows NT
and Tru64 UNIX systems for the OPEN statement in OUTPUT mode, which
is similar to EXTEND and I-O modes. On Windows NT and Tru64 UNIX
systems, access is denied or granted depending on the file lock requested
and the file lock held (with the exception of the READERS support noted
previously.) On OpenVMS Alpha, a new version of the file is always created.

Manual record locking for files with the indexed organization has the
following limitations:

For the READ and START statements, the REGARDLESS phrase is not
fully supported. The read or start operation is performed but the soft
record lock status is not returned.

The START statement does not detect or acquire a record lock.

The READ statement with the ALLOWING READERS phrase is not
supported. It is treated as NO OTHERS if the file is opened in I-O mode
or it is treated as ALL if the file is opened in INPUT mode.

The REWRITE and WRITE statements do not retain record locks.

The (current) RECORD phrase is not supported for the UNLOCK
statement. The ALL RECORDS phrase is assumed for all UNLOCK
statements.

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

Advertising