Few people remember all the parameters of FOPEN, so here they are:
| filenum:=FOPEN(filename | {array of 36 bytes} |
| ,foptions | {logical value, file options} |
| ,aoptions | {logical value, access options} |
| ,recsize | {integer value,+=words,-=bytes} |
| ,device | {array of 8 bytes} |
| ,formsmsg | {array of bytes} |
| ,userlabels | {integer value, 0 to 255} |
| ,blockfactor | {integer value, 1 to 255} |
| ,numbuffers | {integer value, 0 to 16} |
| ,filesize | {double value, maximum records} |
| ,numextents | {integer value, 1 to 32} |
| ,initalloc | {integer value, starting extents} |
| ,filecode | {integer value, file type code} |
| ); | {option variable} |
If FOPEN fails, filenum will be 0 and you call FCHECK to
get the error number.
Check the filenum for errors, not the
Condition code, which has a
lamentable tendency to change before you check it.
Certain errors are common and should be
anticipated in your program:
no such account (50), no such group (51),
no such file (52), no such TEMP file (53), invalid filename format (54),
no $oldpass (58), can't give exclusive access (90), someone has exclusive
access (91), wrong lockword (92), security violation (93),
you didn't specify the same lock/nolock option
as other users did (48).