Saving Program within Workfile

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

fmgoto
Posts: 76
Joined: Thu Jan 15, 2009 5:01 am
Location: Brasilia, Brazil

Saving Program within Workfile

Postby fmgoto » Wed May 06, 2009 12:16 pm

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13313
Joined: Tue Sep 16, 2008 5:38 pm

Re: Saving Program within Workfile

Postby EViews Gareth » Wed May 06, 2009 12:39 pm

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).
Follow us on Twitter @IHSEViews

fmgoto
Posts: 76
Joined: Thu Jan 15, 2009 5:01 am
Location: Brasilia, Brazil

Re: Saving Program within Workfile

Postby fmgoto » Thu May 07, 2009 11:47 am

Gareth,I need a command so that the program will save itself. Thank You!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13313
Joined: Tue Sep 16, 2008 5:38 pm

Re: Saving Program within Workfile

Postby EViews Gareth » Thu May 07, 2009 11:49 am

There isn't one.

And since programs can't modify themselves, what would be the point in saving themselves?
Follow us on Twitter @IHSEViews

smr01
Posts: 9
Joined: Mon Oct 27, 2008 2:24 pm

Re: Saving Program within Workfile

Postby smr01 » Tue May 12, 2009 2:16 pm

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.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 13 guests