Adrian,
I am not trying to pick on you ...
See:
??
and page down to the section on OPENTYP= where it says:
- OPENTYP=
- is the type of open to be performed on the file. Acceptable values are:
- READ
- indicates that the file exists and will only be read.
- WRITE
- indicates that the file may be written to or read from. All changed and added records are written. Other records remain unchanged. If the file does not exist, it is created.
- NEW
- indicates that the file does not exist and is then created. It may then be written to or read from. If the file already exists, it is an error and the file is not opened.
- REPLACE
- indicates that the file is replaced with only the subsequently written records. If the file does not exist, it is created.
- NONE
- indicates that the file is not actually opened. The file is implicitly opened when the first FSREAD, FSWRITE, or FSPOINT is issued to the file. Use of FSOPEN with OPENTYP=NONE is essentially equivalent to an FSSTATE, and differs from an FSSTATE in that it may be used to create an FSCB for the file. The CACHE parameter is ignored if OPENTYPE=NONE.
You can specify OPENTYP=WRITE or OPENTYP=NONE.? Then just issue FSREADs mixed with FSWRITEs.
Hope that helps,
Mark