Hi,
I would like to ask the following question.
Would it be possible to write a program which would run other program in a loop with different arguments depending on a step of the loop. I have one prg with a parameter and I can execute it from a command line for instance: run program_1 austria, run program_1 belgium, etc. where argument in this case is a country name.
Many thanks in advance.
a program executing other program in a loop (EV 6)
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: a program executing other program in a loop (EV 6)
In EViews 6, a running program file ends all program execution upon return. So you cannot run a program from within a program and return control to the calling program upon completion. You can use include statements to get the same effect, as described in the manual.
One of the major advances in EViews 7 is to allow the return of control to the original program.
One of the major advances in EViews 7 is to allow the return of control to the original program.
Re: a program executing other program in a loop (EV 6)
Hi,
luckily I can use Eviews 7 now.
Would you tell me how to overcome this problem in Eviews 7?
To be more precise I would like to execute the piece of program below. However, the execution stops after first step so I guess I need some command to return control to the calling program.
Many thanks is advance.
luckily I can use Eviews 7 now.
Would you tell me how to overcome this problem in Eviews 7?
To be more precise I would like to execute the piece of program below. However, the execution stops after first step so I guess I need some command to return control to the calling program.
Many thanks is advance.
Code: Select all
for %aCtry country1 country2 country3 country4
run my_program {%aCtry}
next-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: a program executing other program in a loop (EV 6)
Use the EXEC command rather than the RUN command.
The main difference between the two is that the EXEC returns to the calling program upon exit, whereas RUN stops.
The main difference between the two is that the EXEC returns to the calling program upon exit, whereas RUN stops.
Re: a program executing other program in a loop (EV 6)
Thanks but are you sure about that (see the attachment)? I was not able to find this command in the Eviews manuals either.
- Attachments
-
- untitled.JPG (8.26 KiB) Viewed 6607 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: a program executing other program in a loop (EV 6)
You need to make sure you're using EViews 7.1
Who is online
Users browsing this forum: No registered users and 1 guest
