Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

doesn't wait the batch finished and cause error reading.

1 view
Skip to first unread message

Mike

unread,
Nov 19, 2009, 11:41:27 PM11/19/09
to
Hi

I use IVF 11.0.075.

Hi, everybody

program main
USE IFPORT

I = SYSTEMQQ('del fort.86')

I = SYSTEM('Process.bat') !This 'Process.bat' will output fort.86

open(11,file='fort.86',status='old',form='binary')
do j=1,100
read(11,end=1)x
print *,x
enddo
1 stop
end

In Process.bat, it contains 'start file.exe'.

I try it in Debug mode with breakpoint in every step. It works ok.
I've noticed that the file can be deleted; batch file running and new
fort.86 can be read.
But if I run it, then it shows in command window: 'file not found fort.
86'. Another message window show 'Debug Assertion Failed!'. But the
''Process.bat' is running and finished.
The error message shows the line "open(11,file='fort.
86',status='old',form='binary')" has a problem.
I suspect it doesn't wait the Process.bat finished.

Any suggestion is welcome.

Mike

Mike

unread,
Nov 19, 2009, 11:47:33 PM11/19/09
to

Oh, I forgot to say I use MS Windows XP.

Mike

Erik Toussaint

unread,
Nov 20, 2009, 6:24:10 AM11/20/09
to

Maybe including the /wait parameter with the start command fixes this.
Try 'start /wait file.exe' in your batch file. (I assume file.exe is the
program which creates the fort.86 file.)

(See:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true
)

Erik.

Colin Watters

unread,
Nov 20, 2009, 4:50:02 PM11/20/09
to

"Erik Toussaint" <us...@example.net.invalid> wrote in message
news:4b067c54$0$764$58c7...@news.kabelfoon.nl...

Or remove "start" altogether, leaving just "file.exe"...

--
Qolin

Email: my qname at domain dot com
Domain: qomputing


Mike

unread,
Nov 23, 2009, 7:26:57 PM11/23/09
to
> (See:http://www.microsoft.com/resources/documentation/windows/xp/all/prodd...
> )
>
> Erik.- Hide quoted text -
>
> - Show quoted text -

Yes. it works. Thanks a lot.

Mike

0 new messages