Description:
Open a direct access file with the specified
access mode and record size. Return a file descriptor which can be used to access the file.
Invocation
CALL RIO_OPEN( FILE, ACMODE, FORM, RECSZ, FD, STATUS )
Arguments
FILE = CHARACTER
(
)
(Given)
Expression giving the name of the file to be opened.
ACMODE = CHARACTER
(
)
(Given)
Expression giving the required access mode. Valid modes are:
‘READ’ - Open the file READONLY. The file must exist.
‘WRITE’ - Create a new file and open it to write/read.
‘UPDATE’ - Open a file to read/write. The file must exist.
‘APPEND’ - Open a file to write/read. If the file does not already exist, create
it. (APPEND has no other effect for direct access)
FORM = CHARACTER
(
)
(Given)
Expression giving the required record formatting. ‘FORMATTED’ or ‘UNFORMATTED’
RECSZ = INTEGER (Given)
Expression giving the record size in bytes. RECSZ is only used if
ACMODE is ‘WRITE’ or ‘APPEND’. If ACMODE is ‘APPEND’ and the file already exists,
RECSZ must agree with the existing record size.
FD = INTEGER (Returned)
Variable to
contain the file descriptor.
STATUS = INTEGER (Given and Returned)
The global status.
Copyright © 2000 Council for the Central Laboratory of the Research Councils