Indicates a nonnative numeric format for unformatted data. It
takes the following form:
CONVERT = fm
fm Is a character expression with one of the following
options:
'LITTLE_ENDIAN'- Little endian integer data of the
appropriate size (INTEGER*1, INTEGER*2,
INTEGER*4, or INTEGER*8) and IEEE
floating-point data of the appropriate size
and type (REAL*4, REAL*8, REAL*16, COMPLEX*8,
COMPLEX*16, or COMPLEX*32). INTEGER*1 data
is the same for little endian and big endian.
'BIG_ENDIAN' - Big endian integer data of the appropriate
size (INTEGER*1, INTEGER*2, INTEGER*4, or
INTEGER*8) and IEEE floating-point data of
the appropriate size and type (REAL*4, REAL*8,
REAL*16, COMPLEX*8, COMPLEX*16, or COMPLEX*32).
INTEGER*1 data is the same for little endian
and big endian.
'CRAY' - Big endian integer data of the appropriate
size (INTEGER*1, INTEGER*2, INTEGER*4, or
INTEGER*8) and CRAY floating-point data of
size REAL*8 or COMPLEX*16.
'FDX' - Little endian integer data of the appropriate
size (INTEGER*1, INTEGER*2, INTEGER*4, or
INTEGER*8) and HP VAX floating-point data
of format F_floating for REAL*4 or COMPLEX*8,
D_floating for size REAL*8 or COMPLEX*16, and
IEEE X_floating for REAL*16 or COMPLEX*32.
'FGX' - Little endian integer data of the appropriate
size (INTEGER*1, INTEGER*2, INTEGER*4, or
INTEGER*8) and HP VAX floating-point data
of format F_floating for REAL*4 or COMPLEX*8,
G_floating for size REAL*8 or COMPLEX*16, and
IEEE X_floating for REAL*16 or COMPLEX*32.
'IBM' - Big endian integer data of the appropriate
size (INTEGER*1, INTEGER*2, INTEGER*4, or
INTEGER*8) and IBM System\370 floating-point
data of size REAL*4 or COMPLEX*8 (IBM
short 4) and size REAL*8 or COMPLEX*16 (IBM
long 8).
'VAXD' - Little endian integer data of the appropriate
size (INTEGER*1, INTEGER*2, INTEGER*4, or
INTEGER*8) and HP VAX floating-point
data of format F_floating for size
REAL*4 or COMPLEX*8, D_floating for size
REAL*8 or COMPLEX*16, and H_floating for
REAL*16 or COMPLEX*32.
'VAXG' - Little endian integer data of the appropriate
size (INTEGER*1, INTEGER*2, INTEGER*4, or
INTEGER*8) and HP VAX floating-point
data of format F_floating for size
REAL*4 or COMPLEX*8, G_floating for size
REAL*8 or COMPLEX*16, and H_floating for
REAL*16 or COMPLEX*32.
'NATIVE' - No data conversion. This is the default.
You can use CONVERT to specify multiple formats in a single
program, usually one format for each specified unit number.
When reading a non-native format, the non-native format on disk is
converted to native format in memory. If a converted non-native
value is outside the range of the native data type, a run-time
message appears.
There are other ways to specify numeric format for unformatted
files: you can specify an OpenVMS logical name or the compiler
option /CONVERT (or OPTIONS/CONVERT). The order of precedence is
OpenVMS logical name, OPEN (CONVERT=), OPTIONS/CONVERT, and then
compiler option /CONVERT. The /CONVERT compiler option and
OPTIONS/CONVERT affect all unit numbers used by the program, while
logical names and OPEN (CONVERT=) affect specific unit numbers.
The following source code shows how to code the OPEN statement to
read unformatted CRAY numeric data from unit 15, which might be
processed and possibly written in little endian format to unit 20:
OPEN (CONVERT='CRAY', FILE='graph3.dat', FORM='UNFORMATTED',
1 UNIT=15)
...
OPEN (FILE='graph3_native.dat', FORM='UNFORMATTED', UNIT=20)