Calling EViews from shell?

For questions regarding programming in the EViews programming language.

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

paues
Posts: 169
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

Calling EViews from shell?

Postby paues » Wed Nov 23, 2016 6:11 am

Is it possible to send arguments to EViews from the command line? If so, how do I do that? Specifically, I would like to tell EViews to execute a program file. Ideally, EViews would just run in the background and then return some output. Alternatively, EViews would just open and then run the program file. In that case, is it possible to reuse an instance of EViews or do I have to open a new instance on each call?

EViews Matt
EViews Developer
Posts: 560
Joined: Thu Apr 25, 2013 7:48 pm

Re: Calling EViews from shell?

Postby EViews Matt » Wed Nov 23, 2016 10:32 am

Hello,

Yes, you can invoke EViews from a command prompt/shell and have it execute a program. For example,

"C:\Program Files\EViews 9\EViews9_x64.exe" C:\Users\me\Documents\foo.prg

Paths and filenames should be changed to reflect your needs, of course. Be default, EViews will open, execute the specified program, and then remain open. If you want EViews to close after the program has finished, have the program execute the "exit" command when it's done.

The syntax above creates a new instance of EViews every time. You can interact with the EViews instance normally after the program has finished, assuming the program doesn't "exit", but not via the command prompt/shell. A "reusable" instance of EViews would require something like COM automation, but that isn't a command line technique. If you're interested, you can learn about EViews COM automation here.

EViews Steve
EViews Developer
Posts: 788
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Calling EViews from shell?

Postby EViews Steve » Wed Nov 23, 2016 10:34 am

The answer is on this page:

http://www.eviews.com/help/helpintro.ht ... asics.html


Sent from my iPhone using Tapatalk

Elderfield.A
Posts: 78
Joined: Thu Jul 11, 2019 10:47 pm

Re: Calling EViews from shell?

Postby Elderfield.A » Mon May 29, 2023 11:38 pm

Hi,

Is there any way to call EViews silently from shell? So that the GUI doesn't launch, but a program can be executed?

Thanks
Adam

EViews Steve
EViews Developer
Posts: 788
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Calling EViews from shell?

Postby EViews Steve » Tue May 30, 2023 7:44 am

try this:

Code: Select all

EViews13.exe /programonly "c:\files\my.prg"

Elderfield.A
Posts: 78
Joined: Thu Jul 11, 2019 10:47 pm

Re: Calling EViews from shell?

Postby Elderfield.A » Wed May 31, 2023 6:23 pm

Thanks Steve - works wonderfully via CMD. Unfortunately not via R system command, this should be something I can figure out though.

Cheers.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 24 guests