HPlogo Accessing Files Programmer's Guide: HP 3000 MPE/iX Computer Systems > Chapter 2 Creating A File

The FOPEN Intrinsic

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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).

Table 2-2 FOPEN/HPFOPEN Parameter Equivalents

FOPEN ParameterHPFOPEN Itemnum,Item
filenum (functional return)filenum (parameter)
formaldesig2, 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

recsize19, 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

userlabels33, user labels
blockfactor40, 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

filesize35, filesize
numextent47, numextent
initialloc36, initial allocation
filecode37, filecode

 

Table 2-3 Determining a File's Physical Characteristics Using FOPEN

CharacteristicParameter DescriptionDefault 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 is allocated

File Identification

userlabels parameter filecode parameter

No user labels filecode = 0

 

Feedback to webmaster