# Open Statement Syntax?

**URL:** <https://forums.developer.nvidia.com/t/open-statement-syntax/130683>\
**Category:** Legacy PGI Compilers (archived)\
**Created:** [April 17, 2007, 2:36pm UTC](https://forums.developer.nvidia.com/t/open-statement-syntax/130683 "2007-04-17T14:36:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![walljam](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@walljam](https://forums.developer.nvidia.com/u/walljam)\
**Post date:** [April 17, 2007, 2:36pm UTC](https://forums.developer.nvidia.com/t/open-statement-syntax/130683/1 "2007-04-17T14:36:33Z")

</div>

Hi, I’m trying to compile these lines, but I keep getting this error.

PGF90-S-0034-Syntax error at or near = (FLOPEN.f: 118)

Here are the lines in question:

OPEN( UNIT=DEVNUM, FILE=DEVNAM, STATUS=CTYPE(ITYPE),  
& RECL=80, BLOCKSIZE=BLKSIZE,  
& FORM=FTYPE(IFRMAT), IOSTAT=IOFLAG)  
  
  
Is there some kind of syntax problem in here? Any help will be greatly appreciated!

James

---

<div class="post-metadata">

**Author:** ![MatColgrove](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/matcolgrove/32/14047_2.png) [@MatColgrove](https://forums.developer.nvidia.com/u/MatColgrove)\
**Post date:** [April 17, 2007, 5:41pm UTC](https://forums.developer.nvidia.com/t/open-statement-syntax/130683/2 "2007-04-17T17:41:02Z")

</div>

Hi James,

Remove the non-standard “BLOCKSIZE” specifier. I think this originated as an extension on VAX but it would have no meaning on Linux.

- Mat

---

<div class="post-metadata">

**Author:** ![walljam](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@walljam](https://forums.developer.nvidia.com/u/walljam)\
**Post date:** [April 17, 2007, 7:07pm UTC](https://forums.developer.nvidia.com/t/open-statement-syntax/130683/3 "2007-04-17T19:07:01Z")

</div>

thanks mat!

---

<div class="post-metadata">

**Author:** ![Charleston](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Charleston](https://forums.developer.nvidia.com/u/Charleston)\
**Post date:** [June 27, 2007, 6:28pm UTC](https://forums.developer.nvidia.com/t/open-statement-syntax/130683/4 "2007-06-27T18:28:09Z")

</div>

I am trying to compile CALMM5 and I am getting this error:

PGF90-S-0034-Syntax error at or near = (calmm5.v3.f: 126)  
0 inform, 0 warnings, 1 severes, 0 fatal for calmm5

Line 126 of calmm5.v3.f corresponds to:

open (io3,defaultfile=inpath,file=infile(iin)  
& form=‘unformatted’,status=‘old’,iostat=iost3)

Thanks

---

<div class="post-metadata">

**Author:** ![hongyon2](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@hongyon2](https://forums.developer.nvidia.com/u/hongyon2)\
**Post date:** [June 27, 2007, 9:52pm UTC](https://forums.developer.nvidia.com/t/open-statement-syntax/130683/5 "2007-06-27T21:52:37Z")

</div>

Hi Charleston,

Please remove defaultfile=inpath as PGI does not support this. defaultfile provides a path to specifier ‘file=infile(iin)’. Unfortunately, We have calmm5 version 2.6 only and it does not have defaultfile option in source code.

I think what you can do is give a full pathname to specifier ‘file’.

Hongyon

---

<div class="post-metadata">

**Author:** ![avemuri](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@avemuri](https://forums.developer.nvidia.com/u/avemuri)\
**Post date:** [September 30, 2008, 10:16pm UTC](https://forums.developer.nvidia.com/t/open-statement-syntax/130683/6 "2008-09-30T22:16:44Z")

</div>

Hello

I am trying to compile the following lines and get the PGF90-S-0034-Syntax error. I am not sure what the error means.

95 C Include Files  
96  
97 INCLUDE SUBST\_MPICH ! MPI definitions and parameters  
98 INCLUDE SUBST\_IODECL ! I/O definitions and declarations  
99 INCLUDE SUBST\_PACTL\_ID ! PA control parameters  
PGF90-S-0034-Syntax error at or near identifier subst\_mpich (par\_init.F: 97)  
0 inform, 0 warnings, 1 severes, 0 fatal for par\_init

---

<div class="post-metadata">

**Author:** ![MatColgrove](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/matcolgrove/32/14047_2.png) [@MatColgrove](https://forums.developer.nvidia.com/u/MatColgrove)\
**Post date:** [September 30, 2008, 10:29pm UTC](https://forums.developer.nvidia.com/t/open-statement-syntax/130683/7 "2008-09-30T22:29:54Z")

</div>

Hi avemuri,

The file names after an INCLUDE directive are character constants so need to be quoted.

However, the names of the files suggest to me that these are macros so perhaps the file isn’t being preprocessed? What happens if you add the flag “-Mpreprocess” to your compilation?

Hope this helps,  
Mat
