Compaq COBOL AAQ2G1FTK User Manual

Page 561

Advertising
background image

Compaq COBOL for OpenVMS VAX and Compaq COBOL Compatibility and Migration

B.5 Compaq COBOL Differences Across Operating Systems

On Windows NT and Tru64 UNIX, this RTL check does not detect some
differences that would be detected on an OpenVMS Alpha system, because
all but signed 16- and 32-bit integers are mapped onto character strings. For
example, if you write an indexed file using a key described as an unsigned
32-bit integer, the character string you will read is the integer with its bytes
reversed. On an OpenVMS Alpha system, by contrast, you receive a severe
error when you try to open a file with the incompatible key.

B.5.6 RMS Special Register References in Your Code

Compaq COBOL on Windows NT and Tru64 UNIX does not support RMS Special
Registers. If you include them, you may receive the following general diagnostic
message when you attempt to compile the program:

cobol: Severe:

. . .

Undefined name

B.5.7 Time and Fractional Seconds

Fractions of seconds are not handled by the Compaq COBOL runtime library
on Windows NT. The value zero is returned for those parts which cannot be
determined. This impacts the following:

ACCEPT FROM TIME
FUNCTION CURRENT-DATE
FUNCTION WHEN-COMPILED

B.6 File Compatibility Across Languages and Platforms

Files created by different programming languages may require special processing
because of language and character set incompatibilities. The most common
incompatibilities are data types and data record formats. You should be aware of
the following:

Print-controlled files that are created on Windows NT or the Tru64 UNIX
operating system cannot be used as VFC files on the OpenVMS Alpha
operating system.

VFC files cannot be used on Windows NT or on the Tru64 UNIX operating
system.

On Windows NT and Tru64 UNIX, to read a file with variable-length
records, you must describe the file as such in the program (use RECORD IS
VARYING). On OpenVMS Alpha, you can read a file with variable-length
records by using a file description for fixed-length records.

On OpenVMS Alpha, a file with fixed-length records can be described in a
COBOL program with an FD specifying a length shorter than the file record
length. On input, the extra data in each record is ignored on OpenVMS
Alpha. On Windows NT and Tru64 UNIX, the length specified for the FD
must match the actual length of the records in the file; you must not use
RECORD IS VARYING to read a file with fixed-length records.

On OpenVMS Alpha, an existing ORGANIZATION INDEXED file cannot
be read with an FD specifying ORGANIZATION SEQUENTIAL. To read
the file on Windows NT or Tru64 UNIX sequentially, use ORGANIZATION
INDEXED, ACCESS SEQUENTIAL (or DYNAMIC), and READ NEXT.

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

Advertising