Executing several .prg from a master .prg

For questions regarding programming in the EViews programming language.

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

Overtime
Posts: 12
Joined: Tue Feb 18, 2014 6:15 am

Executing several .prg from a master .prg

Postby Overtime » Fri Feb 21, 2014 9:00 am

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

Overtime
Posts: 12
Joined: Tue Feb 18, 2014 6:15 am

Re: Executing several .prg from a master .prg

Postby Overtime » Fri Feb 21, 2014 9:23 am

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.

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

Re: Executing several .prg from a master .prg

Postby EViews Gareth » Fri Feb 21, 2014 9:46 am

Use exec


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests