Using KSAM/XL and KSAM 64 (32650-90886)

Chapter 9 129
KSAM Intrinsics
FOPEN
Default: 0
filecode
16-bit signed integer by value (optional)
Passes a value that can be used as a file code to identify the type of file.
This code is recorded in the file label and is accessible through the
FFILEINFO intrinsic. Applicable only at file creation (except when opening
an old file that has a negative file code).
If the program is running in user mode, specify a file code in the range 0 to
32,767 to indicate the file type being created; programs running in user
mode can access files with nonnegative file codes. If the program is
running in privileged mode, specify a file code in the range -32,768 to
32,767; programs running in privileged mode can access files with a file
code in the range -32,768 to 32,767. If an old file with a negative file code is
opened, the file code specified must match the file code in the file label.
Default: 0
Table 9-6. FOPEN/HPFOPEN Parameter Equivalents
FOPEN Parameter HPFOPEN Itemnum,Item
filenum
(functional return)
filenum
(parameter)
formaldesig 2,formaldesig
foption
:
Bits (14:2) Domain
Bit (13:1) ASCII/binary
Bits (10:3) File designator
Bits (8:2) Record format
Bit (7:1) Carriage-control
Bit (6:1) Labeled tape
Bit (5:1) Disallow file equation
Bits (2:3) File type
3, domain
53, ASCII/binary
5, file designator
6, record format
7, carriage-control
8, labeled tape
9, disallow file equation
10, file type
aoption:
Bits (12:4) Access type
Bit (11:1) Multirecord
Bit (10:1) Dynamic locking
Bits (8:2) Exclusive
Bit (7:1) Inhibit buffering
Bits (5:2) Multiaccess mode
Bit (4:1) Nowait I/O
Bit (3:1) File copy
11, access type
15, multirecord
12, dynamic locking
13, exclusive
46, inhibit buffering
14, multiaccess mode
16, nowait I/O
17, file copy