fortran open append


I am an experienced vax/vms fortran programmer and now starting to work on a linux computer. I would like to known how I should implement the following statement:

Open( unit=1,file=“test.txt”,access=“append”,form=“formatted”,status=“unknown”)

In a test program the compiler complains that he finds an unknown value. The documantation tells that append it added to match the vax/vms statement.

If someone can point me in the right direction, thanks.


Hi Rik,

The valid values for ACCESS are DIRECT or SEQUENTIAL. To append to the end of a file set POSITION to APPEND.


     Open( unit=1, file="test.txt", access="sequential", 
    &      form="formatted", status="unknown", 
    &      position="append")

Hope this helps,