pgf77 POSITION='APPEND'?

Is POSITION=‘APPEND’ valid in an open using pgf77? I don’t see anything one way or the other in the PGI Fortran Reference.

Below is some simple code that compiles with pgf90 but not with pgf77. Removing the POSITION=‘APPEND’ clause allows it to compile cleanly.

prompt> cat pgf77_test.F
SUBROUTINE OPENAPP(CFILE,IU)

CHARACTER ()CFILE

OPEN(IU,FILE=CFILE,STATUS=‘OLD’,POSITION=‘APPEND’)

CLOSE (IU)
RETURN
END
prompt> pgf90 -c pgf77_test.F
prompt> pgf77 -c pgf77_test.F
PGFTN-S-0034-Syntax error at or near = (pgf77_test.F: 5)
0 inform, 0 warnings, 1 severes, 0 fatal for openapp
PGFTN/x86 Linux 7.0-5: compilation completed with severe errors
prompt> pgf77 -V

pgf77 7.0-5 32-bit target on x86 Linux
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2007, STMicroelectronics, Inc. All Rights Reserved.

Hi Tod,

OPEN’s POSITION specifier was first introduced in Fortran 90 and is not supported by Fortran 77. Instead, you can try using the VAX extension “ACCESS=‘APPEND’” which is supported by both pgf77 and pgf90.

Hope this helps,
Mat

Ahh, I see.

Fortran isn’t my native language, but I had a vague recollection of reading something like this.

Thanks, Mat.

Tod