Page 1 of 1

Executing several .prg from a master .prg

Posted: Fri Feb 21, 2014 9:00 am
by Overtime
Hi all,

I'm having a problem executing sub-programs from a master program. Currently,
I'm using the 'run' command to do this, but I get the feeling the command causes
the program to stop before it completes all the run commands I have scripted.

The command reference book seems to say as much, but if this is the case, then
it renders useless one of the central features of a 'run' command....

Is there a way around this?

I'm using E-views 7.1.

Below is some code which illustrates the structure I have:

Code: Select all

run imports1.prg run imports2.prg run imports3.prg

Re: Executing several .prg from a master .prg

Posted: Fri Feb 21, 2014 9:23 am
by Overtime
OK figured it out, use 'include'

Yes, it was mentioned in the 'run' section of the command reference manual, but I got
confused because it doesn't accept code of the following structure:

[/code]
%path1 = "C:\Estimation\eviews_trade_model\"
%path_temp = %path1 + "Model_programs\imports1.prg"
include %path_temp
[/code]

which the run command does.

Anyway, got it to work so im happy.

Re: Executing several .prg from a master .prg

Posted: Fri Feb 21, 2014 9:46 am
by EViews Gareth
Use exec