Frequency from Macrobond database?
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Frequency from Macrobond database?
Is it possible to get metadata for a series (e.g. first/last period with data and frequency) in the Macrobond database before copying it to a workfile?
-
EViews Chris
- EViews Developer
- Posts: 161
- Joined: Wed Sep 17, 2008 10:39 am
Re: Frequency from Macrobond database?
There may not be a way to do this at the moment because of limits in the communication between EViews and Macrobond.
On an EViews native database (and some other database formats) you could do the following
string metainfo = @wquery("dbname", "name=gdp", "freq,start,end")
to retrieve the frequency, start date and end date for the series 'gdp' in the database 'dbname'.
I'll check in with the Macrobond development team to see if I'm missing anything.
Chris
On an EViews native database (and some other database formats) you could do the following
string metainfo = @wquery("dbname", "name=gdp", "freq,start,end")
to retrieve the frequency, start date and end date for the series 'gdp' in the database 'dbname'.
I'll check in with the Macrobond development team to see if I'm missing anything.
Chris
Re: Frequency from Macrobond database?
It seems that this does not work with a Macrobond database. I will contact them from my end as well.
Also, the function @wquery does not appear to be documented in the reference material to Eviews 7.2.
Also, the function @wquery does not appear to be documented in the reference material to Eviews 7.2.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Frequency from Macrobond database?
It was added after the documentation was written :(
Re: Frequency from Macrobond database?
We have added support for the @wquery function in Macrobond. It will be available in all version after 1.4.40.
Regards,
Thomas O
Macrobond Financial
Regards,
Thomas O
Macrobond Financial
Re: Frequency from Macrobond database?
How do I give the Macrobond database a shorthand name when I open it through a written Eviews program? It works just fine when I open it through the menus (File/Open/Database...). But when I use
the shorthand is not mb, as I would expect, but whatever I chose the last time I opened the database through the menus.
Code: Select all
dbopen(type=macrobond) as mbRe: Frequency from Macrobond database?
Also, is there some way to check that the Macrobond database can indeed be opened before opening it? I have co-workers who do not have Macrobond installed and I would like to give them an error message saying something like "Macrobond has to be installed in order to run this program."
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Frequency from Macrobond database?
There isn't something built into EViews that can do it. I suppose you could try opening a Macrobond database straight away, and if it errors, you know it won't work :DAlso, is there some way to check that the Macrobond database can indeed be opened before opening it? I have co-workers who do not have Macrobond installed and I would like to give them an error message saying something like "Macrobond has to be installed in order to run this program."
Re: Frequency from Macrobond database?
I guess I have to dive into the wondrous world of error handling 
Do you have any insights on the shortname issue I posted earlier in this thread?
Do you have any insights on the shortname issue I posted earlier in this thread?
-
EViews Jason
- EViews Developer
- Posts: 870
- Joined: Tue Sep 16, 2008 3:50 pm
Re: Frequency from Macrobond database?
In regards to the shorthand issue, it could be one of several things. The first thing I would try is changing your syntax to
'xx' is the database name. In the Macrobond case, database name is irrelevant and ignored. So it can be anything. It is needed as a placeholder for the EViews parser. Without the database name, the EViews the parser will get confused.
If you find the shorthand is still not changing, make sure the database is not in the database registry (options->database registry).
If it is not in the database registry, change your default database by opening a second database. For example
Code: Select all
dbopen(type=macrobond) xx as mbIf you find the shorthand is still not changing, make sure the database is not in the database registry (options->database registry).
If it is not in the database registry, change your default database by opening a second database. For example
Code: Select all
dbopen(t=fred)Re: Frequency from Macrobond database?
Thank you! The syntax
worked wonders.
Code: Select all
dbopen(type=macrobond) xx as mbWho is online
Users browsing this forum: No registered users and 2 guests
