Page 1 of 1

Saving Program within Workfile

Posted: Wed May 06, 2009 12:16 pm
by fmgoto
I usually run an Eviews code by clicking New/File/Program and hitting "Run". However, I need to store these programs (with minor changes) every time I run each program. I wonder if there is any way I could self-save the program I ran (or embed it within the same workfile Text object).

Thank You, Fabio

Re: Saving Program within Workfile

Posted: Wed May 06, 2009 12:39 pm
by EViews Gareth
You cannot save a program in a workfile (although you could copy the text into a text object and save that). However you can save the program file itself to disk (by clicking save).

Re: Saving Program within Workfile

Posted: Thu May 07, 2009 11:47 am
by fmgoto
Gareth,I need a command so that the program will save itself. Thank You!

Re: Saving Program within Workfile

Posted: Thu May 07, 2009 11:49 am
by EViews Gareth
There isn't one.

And since programs can't modify themselves, what would be the point in saving themselves?

Re: Saving Program within Workfile

Posted: Tue May 12, 2009 2:16 pm
by smr01
You could try a hack like this:
1) Make another program to just save the program and workspace.
2) Write a .bat file, ie windows script file, to run your first program and then the new program to do the saving.

i.e. The bat file contains.

xxx.prg
xxy.prg

The bat file will wait for the fist program to finish before runing the second. I use this all the time.