starlite79
Technical User
Hi.
I am trying to write some standard output to file with a name based on a few characters from a file name I specify. Here are some important chunks of code I'm using:
The 15th index of infile1 is a file similar to xxxyymmddh00.xxxx
So, I'd like the 4-9th characters of that file to be included in the output file name. However, at line 238 of my code (marked above) I get a Fortran runtime error of "missing initial left parenthesis in format" and then it lists my file infile1(15)
I can't figure out what this error means. Would appreciate some help.
I am trying to write some standard output to file with a name based on a few characters from a file name I specify. Here are some important chunks of code I'm using:
Code:
character*20 infile1(20), infile2(20), tfile
do 100 i=1,15
read(iunit(1),1099) infile1(i)
100 write(*,*) infile1(i)
tfile=infile1(15)
c ofile name is xxxxx_tseries_yymmdd.dat (line 238)
len_ofile = index(opath,' ') - 1
ofile=opath(1:len_ofile)//'xxxxx_tseries_'//tfile(4:9)//'.dat'
The 15th index of infile1 is a file similar to xxxyymmddh00.xxxx
So, I'd like the 4-9th characters of that file to be included in the output file name. However, at line 238 of my code (marked above) I get a Fortran runtime error of "missing initial left parenthesis in format" and then it lists my file infile1(15)
I can't figure out what this error means. Would appreciate some help.