|
|
The FOPEN intrinsic is the other programmatic interface
for supplying the file system with information about your file. Its syntax is:
filenum := FOPEN (formaldesignator, foptions, aoptions,
recsize, device, formmsg, userlabels,
blockfactor, numbuffers, filesize,
numextents, initialloc, filecode);
The following table shows the correspondence between the optional parameters of
FOPEN and HPFOPEN that you can use to specify a file's
physical characteristic at file creation. For more details on using the
FOPEN intrinsic, refer to the MPE/iX Intrinsics Reference
Manual.
Table 2-1 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 |
recsize | 19, record size |
device |
20, device name
22, volume class 23, volume name
24, density 25, printer environment
26, remote environment 42, device class
48, reverse VT |
formmsg |
8, labeled tape label 28, spooled message
30, labeled tape type 31, labeled tape expiration
32, labeled tape sequence 54, KSAM parms |
userlabels | 33, user labels |
blockfactor | 40, block factor |
numbuffers:
Bits (11:5) numbuffers Bits (4:7) spooler copies
Bits (0:4) output priority |
44, numbuffers
34, spooler copies
27, output priority |
filesize | 35, filesize |
numextent | 47, numextent |
initialloc | 36, initial allocation |
filecode | 37, filecode |
Table 2-2 Determining a File's Physical Characteristics Using FOPEN
Characteristic |
Parameter Description |
Default Value |
Record Structure |
foptions: ASCII/binary option
foptions: record format option
foptions: carriage-control option
recsize parameter |
Binary Fixed-length None 256 bytes |
File Structure |
foptions: file type option
device parameter
blockfactor parameter
filesize parameter
initialloc parameter
numextents parameter |
Standard Volume class DISC
128/recsize rounded down 4 gigabytes 0 extents
A variable number of extents are allocated |
File Identification |
userlabels parameter
filecode parameter |
No user labels filecode = 0 |
|