HP Pascal/iX Programmer's Guide (31502-90023)

3- 8
Parameters
logical_file
The name of the logical file.
file_number
The file number of the open physical file. The physical
file must have been opened with a direct call to an
operating system routine or a non-Pascal routine. You
cannot call the
associate
procedure with the file number of
a closed file or a file that was opened with the Pascal
procedure append, associate, open, reset, or rewrite.
open_options
One of the following options. It must be a string literal:
'READ' Associate with sequential access file
with read-only access.
'WRITE' Associate with sequential access file
with write-only access.
'READ,DIRECT' Associate with direct access file with
read-only access.
'WRITE,DIRECT' Associate with direct access file with
write-only access.
'READ,WRITE,DIRECT' Associate with direct access file with
read-write access.
'DIRECT' Associate with direct access file with
read-write access (same as 'READ,
WRITE, DIRECT' ).
'NOREWIND' Associates with a file without changing
the current file position.
You must specify one of the above strings for
open_options
.
The system-dependent open options listed in Appendix A
(for MPE/iX) and Appendix B (for HP-UX) apply to the
file-opening procedures append, open, reset, and rewrite.
Pascal ignores them when they are used with associate.
You cannot specify read access if the physical file is not open for read
access, or to specify write access if it is not open for write access.
If you associate a logical file with an empty physical file, for read
access, the next read causes an error.
Table 3-3 summarizes the characteristics of the predefined procedure
associate
.
Table 3-3. Characteristics of Associate Procedure
---------------------------------------------------------------------------------------------
| | |
| Type of File That it Can Open | Any. |
| | |
---------------------------------------------------------------------------------------------
| | |
| State in Which it Opens File | Specified in
open_options
. |
| | |
---------------------------------------------------------------------------------------------
| | |
| Manner in Which File Can Be Accessed | Either--Defined by characteristics of |
| | physical file. |
| | |
---------------------------------------------------------------------------------------------
| | |
| Purpose for Which it Opens File | Input, output or both. |
| | |
---------------------------------------------------------------------------------------------
| | |