Next: READ Statement
Up: More Input and Output
Previous: Input / Output
The syntax is,
OPEN([UNIT=]< integer >,&
FILE=< filename >, ERR=< label >, &
STATUS=< status >, ACCESS=< method >,&
ACTION=< mode >, RECL=< int-expr >)
where,
- < filename > is a string,
- < status > is 'OLD', 'NEW', 'REPLACE',
'SCRATCH' or 'UNKNOWN',
- < method > is 'DIRECT' or 'SEQUENTIAL'
- < mode > is 'READ', 'WRITE' or 'READWRITE'
- if the file is direct access the RECL must be specified,
For example,
OPEN(17,FILE='output.dat',ERR=10, &
STATUS='REPLACE', &
ACCESS='SEQUENTIAL',ACTION='WRITE')
OPEN(14,FILE='input.dat',ERR=10, &
STATUS='OLD', RECL=iexp, &
ACCESS='DIRECT',ACTION='READ')
For more information, click here
Next: READ Statement
Up: More Input and Output
Previous: Input / Output
©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997Not for commercial use.