Hello,
I have a number of folders labeled K00001 to K00100 in my scratch folder. Each folder contains a file called a.dat.
From my scratch folder, I would like to go into each folder, read the content of a.dat, save the necessary information to an array and then move on to the next folder.
I declared a CHARACTER as such:
CHARACTER(*), PARAMETER :: fileplace ="/home/vahid/scratch/K"
The I run a DO loop over the folders:
DO f=1,100
OPEN(unit=100,'(a,i5,a)') 'fileplace',f,'/a.dat'
read the file, etc.
ENDDO
The OPEN statement results in the following error:
error #5082: Syntax error, found IDENTIFIER 'FILEPLACE' when expecting one of: <END-OF-STATEMENT> ;
OPEN(unit=100,'(a,i5,a)') fileplace,f,/a.dat
Any suggestions as to how I can resolve this error would be a great help.
Thank you,
Vahid
I have a number of folders labeled K00001 to K00100 in my scratch folder. Each folder contains a file called a.dat.
From my scratch folder, I would like to go into each folder, read the content of a.dat, save the necessary information to an array and then move on to the next folder.
I declared a CHARACTER as such:
CHARACTER(*), PARAMETER :: fileplace ="/home/vahid/scratch/K"
The I run a DO loop over the folders:
DO f=1,100
OPEN(unit=100,'(a,i5,a)') 'fileplace',f,'/a.dat'
read the file, etc.
ENDDO
The OPEN statement results in the following error:
error #5082: Syntax error, found IDENTIFIER 'FILEPLACE' when expecting one of: <END-OF-STATEMENT> ;
OPEN(unit=100,'(a,i5,a)') fileplace,f,/a.dat
Any suggestions as to how I can resolve this error would be a great help.
Thank you,
Vahid