The FOPEN Intrinsic
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
(32650-90028).
[REV BEG]
Table 2-2. 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 | 3, domain |
| Bit (7:1) carriage-control | |
| Bit (6:1) labeled tape | 53, ASCII/binary |
| Bit (5:1) disallow file equation | |
| Bits (2:3) file type | 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 | 11, access type |
| Bit (7:1) inhibit buffering | |
| Bits (5:2) multiaccess mode | 15, multirecord |
| Bit (4:1) nowait I/O | |
| Bit (3:1) file copy | 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 |
| | |
---------------------------------------------------------------------------------------------
Table 2-2. FOPEN/HPFOPEN Parameter Equivalents (cont.)
---------------------------------------------------------------------------------------------
| | |
| FOPEN Parameter | HPFOPEN Itemnum,Item |
| | |
---------------------------------------------------------------------------------------------
| | |
| 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 |
| | |
---------------------------------------------------------------------------------------------
[REV END]
Table 2-3. Determining a File's Physical Characteristics Using FOPEN
--------------------------------------------------------------------------------------
| | | |
| Characteristic | Parameter Description | Default Value |
| | | |
--------------------------------------------------------------------------------------
| | | |
| Record Structure | foptions: ASCII/binary option | Binary |
| | | Fixed-length |
| | foptions: record format option | None |
| | | 256 bytes |
| | foptions: carriage-control option | |
| | | |
| | recsize parameter | |
| | | |
--------------------------------------------------------------------------------------
| | | |
| File Structure | foptions: file type option | Standard |
| | | Volume class DISC |
| | device parameter | 128/recsize rounded down |
| | | 4 gigabytes |
| | blockfactor parameter | 0 extents |
| | | A variable number of |
| | filesize parameter | extents is allocated |
| | | |
| | initialloc parameter | |
| | | |
| | numextents parameter | |
| | | |
--------------------------------------------------------------------------------------
| | | |
| File | userlabels parameter | No user labels |
| Identification | | |
| | filecode parameter | filecode = 0 |
| | | |
--------------------------------------------------------------------------------------