HPlogo Accessing Files Programmer's Guide

Accessing Files Programmer's Guide: 900 Series HP 3000 Computer Systems

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 6 ♥
E0692 Edition 5

HP Part Number: 32650-90885

Edition:

Published: E0300

Notice
Table of Contents
1 Introduction
Disk Files and Device Files
Topics in this Manual
2 Creating A File
The HPFOPEN Intrinsic
NOWAIT I/O
NOWAIT I/O intrinsics
Aborting NOWAIT I/O
Limitations
The FOPEN Intrinsic
The BUILD Command
The FILE Command
Summary of Overrides
Specifying a Record Format
Fixed-length records
Variable-length records
Undefined-length records
Specifying a File Type
Standard files
KSAM files
RIO files
Circular files
Message files
Specifying Record Size
Specifying Disk Volume Restrictions
Specifying a File Code
Specifying Storage Format
3 Specifying a File Designation
MPE/iX File Designators
User-Defined Files
Lockwords
Backreferencing files
System-Defined Files
Input/Output sets
Passed files
Using Command Interpreter Variables and Expressions Within File Designators
Parsing and Validating File Designators
4 Specifying a File Domain
New Files
Temporary Files
Permanent Files
Changing Domains
Searching File Directories
Listing Files
5 Opening a File
How the File System Opens a File
Which to Use: HPFOPEN or FOPEN
Opening a Disk File
Opening a new disk file
Opening a permanent disk file
Opening a System-Defined File
Opening $STDIN
Opening $STDLIST
Opening a Device File
Device-dependent file characteristics
New and permanent device files
Opening an unlabeled magnetic tape file
Opening a labeled magnetic tape file
6 Closing a File
How the File System Closes a File
Closing a Disk File
Closing a new disk file as permanent
Closing a permanent disk file
Closing a Magnetic Tape File
7 Record Selection and Data Transfer
Record Pointers
Record Selection
Sequential access
Random access
Update access
RIO access
Multiple Record Transfers
Control Operations
Spacing
Pointing
Rewinding
Magnetic Tape Considerations
8 Writing to a File
Sequential Access and Random Access
Writing to a disk file using sequential access
Writing to a disk file using random access
Writing to $STDLIST
Writing Messages to the System Console
Writing a message to the system console
Writing a message to the system console and requesting a reply
Writing to a Magnetic Tape File
Writing to an unlabeled magnetic tape file
Writing to a labeled magnetic tape file
Writing a File Label to a Labeled Tape File
Writing User Data in ANSI Labels
9 Reading from a File
Sequential Access and Random Access
Reading from a disk file using sequential access
Reading from a disk file using random access
Increasing I/O performance using FREADSEEK
Reading From $STDIN
Reading From a Magnetic Tape File
Reading a File Label from a Labeled Tape File
10 Updating a File
11 Accessing a File Using Mapped Access
How to Access a File Mapped
Advantages of mapped access
Short-mapped access
Long-mapped access
Large-mapped access
Opening a File Mapped
New Intrinsics
HPFADDTOPOINTER
HPFFILLDATA
HPFMOVEDATA
HPFMOVEDATALTOR
HPFMOVEDATARTOL
12 Sharing a File
Simultaneous Access of Files
Exclusive access
Semi-exclusive access
Shared access
Multiaccess
Global multiaccess
Sharing the File Using FLOCK and FUNLOCK
13 Maintaining File Security
Access Control Definition Security (ACD)
ACD scope
Owners
How acds work
ACD modes
Managing ACDs with commands and intrinsics
Preserving ACDs
Managing ACDs
Logging system events
Logging a specific user
Logging file security related events
Traditional Mechanism for File Security
Specifying and restricting file access by access mode
Specifying and restricting file access by type or user
Changing security provisions of disk files
Suspending and restoring security provisions
14 Getting File Information
Displaying General File Information
Displaying permanent file information with LISTFILE
Displaying temporary file information with LISTFILE...(;TEMP)
Displaying file equations with LISTEQ
Retrieving Specific File Information
[:CMD] FINFO
FFILEINFO
FGETINFO
FLABELINFO
Determining Interactive/Duplicative Files with FRELATE
Displaying File Error Information
FCHECK
FERRMSG
PRINTFILEINFO
Writing a file system error-check procedure
A Pascal/XL Program Examples
Program Example A-2
Program Algorithm
Source code listing
Program Example A-3
Program Algorithm
Source code listing
Program Example A-4
Program Algorithm
Source code listing
Program Example A-5
Program Algorithm
Source code listing
Index
List of Figures
1-1 File System Interface
1-2 Records/Files Relationship
2-1 File System Hierarchy of Overrides
2-2 Fixed-Length Records
2-3 Variable-length Records
2-4 Undefined-Length Records
2-5 Record Placement for ASCII Files
3-1 Passing Files between Program Runs
3-2 Passing Files within a Program Run
3-3 Illustration of FPARSE Usage
3-4 Illustration of FPARSE Usage
3-5 Illustration of FPARSE Usage
5-1 File System Hierarchy of Overrides
6-1 Using the FCLOSE Intrinsic with Unlabeled Magnetic Tape
7-1 Record Pointers
7-2 Magnetic Tape Markers
12-1 Requested Access Granted, Unless Noted
List of Tables
2-1 FOPEN/HPFOPEN Parameter Equivalents
2-2 Determining a File's Physical Characteristics Using FOPEN
2-3 FILE, FOPEN, and HPFOPEN Parameters
2-4 Comparison of Logical Record Formats
2-5 Standard Default Record Sizes
2-6 Reserved File Codes
3-1 System-Defined File Designators
3-2 Input Set
3-3 Output Set
3-4 New Files Versus $NEWPASS
3-5 Old Files Versus $OLDPASS
4-1 Features of New, Temporary, and Permanent Files
4-2 File Domains Permitted
5-1 Device-Dependent Restrictions
7-1 Intrinsics for Data Transfer
12-1 File Sharing Restriction Options
13-1 SYSGEN System Logging
13-2 Type 135 Record Format
13-3 Type 136 Record Format
13-4 Type 137 Record
13-5 Type 139 Record
13-6 Type 140 Record Format
13-7 Type 141 Record
13-8 Type 134 Record Format
13-9 Type 138 Record Format
13-10 Traditional File Access Mode Types
13-11 Effects of Access Modes
13-12 User Type Definitions (Traditional Security)
13-13 Default Security Provisions (Traditional)
14-1 Format Selection
14-2 FINFO Options
14-3 PRINTFILEINFO Information




Index


Chapter 1 Introduction