Order of execution question

DaveWare

New Member
The following is a snippet from my code at the end to close a file. When it runs, the file does not completely finish it's output until after the second include file even though it closes the output stream between the include files. The message also doesn't show until after the screen output. I don't understand why the actions don't happen in order.

Code:
{mfreset.i}
 
IF excel THEN DO:
  PUT STREAM excl SKIP.
  OUTPUT STREAM excl CLOSE.
END.

MESSAGE SEEK(excl). PAUSE.

{mfgrptrm.i} /*Report-to-Window*/
END. /* Mainloop */
 
Last edited by a moderator:
1) Please enclose sample code in [ C O D E ] tags. That makes code much more readable.

2) You probably need to show the content of the include files. It is probably relevant.

3) The message statement is using the default output stream rather than the named stream "excel". I would hazard a guess that the default stream is closed in the 2nd include file.
 
Back
Top