Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

IOSTAT 30 got me stumped

DavidWhite
Valued Contributor II
334 Views
Having problems with accessing some files, getting IOSTAT 30.

INQUIRE(FILE=TRIM(LICFILE_LOC)//"\\"//TRIM(MName)//".lc", NUMBER=I, IOSTAT=iresult)

If (Logopen) WRITE(99,'(A,I4,I4)') TRIM(LICFILE_LOC)//"\\"//TRIM(MName)//".lc"//" is attached to unit ",I,Iresult

INQUIRE(UNIT=2, NAME=attachedfile, IOSTAT=iresult)

If (Logopen) WRITE(99,'(A,I4)') "UNIT 2 is attached to file "//TRIM(attachedfile),Iresult

Open (2,FILE=TRIM(LICFILE_LOC)//"\\"//TRIM(MName)//".lc",STATUS="OLD", &

ACTION="READ",SHARE="DENYWR",IOSTAT=I)

IF (logopen) WRITE(99,'(A,I4)') "Open "//TRIM(LICFILE_LOC)//"\\"//TRIM(MName)//".lc", I


F:\\AIPS Web\\Model Download Logs\\AWAPROPS.lc is attached to unit -1 0
UNIT 2 is attached to file 0
Open F:\\AIPS Web\\Model Download Logs\\AWAPROPS.lc 30

So file is not attached, unit number is not in use, but when I attempt to open the file, I get IOSTAT 30.

Only explanation is that someone else has the file open, I think.

Thanks,


David

0 Kudos
2 Replies
mecej4
Honored Contributor III
334 Views
Check using the Task Manager if the same (or a related) application was run earlier but has not been properly terminated. If you find the culprit, you may terminate it if you are the only person managing that process.
0 Kudos
DavidWhite
Valued Contributor II
334 Views
That didn't help, but some extra write statements did:

F:\AIPS Web\Model Download Logs\AWAPROPS.lc is attached to unit -1 0

UNIT 2 is attached to file 0

UNIT 1 is attached to file \\model2.alcoa.com\Model_Log$\AWAPROPS.lc 0

Open F:\AIPS Web\Model Download Logs\AWAPROPS.lc 30

The file was attached through a share, but not by the direct name, so INQUIRE did not think the file is attached!

David

0 Kudos
Reply