Haver metadata
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Haver metadata
I’m trying to fetch data from Haver databases to Eviews (7.2). I have noticed that some of the series metadata are not being copied across as series attributes. I do get a name, last update, description, source and units, but not start date, end date, long source and aggregation type. Can you please let me know if there is a way that I can get them in Eviews?
-
EViews Jason
- EViews Developer
- Posts: 870
- Joined: Tue Sep 16, 2008 3:50 pm
Re: Haver metadata
You will not be able to get database specific information such as long source and aggregation type. But you could use @wquery to get the start and end dates. NOTE: @wquery is an undocumented EViews 7 feature that will be made official for EViews 8. Usage will therefore be on an 'as-is' basis.
Here is an example of retrieving the start date, end date, freq and source of all the objects in a given database.
Here is an example of retrieving the start date, end date, freq and source of all the objects in a given database.
Code: Select all
'get the list of objects in myhaver_db along with every objects freq, start date, end date, and source
string query_results = @wquery("haverw", "name matches *", "name,freq,start,end, source")
string formatted_results = @replace(query_results, ",", " ") 'convert commas to spaces
!objCount = @wcount(formatted_results)/5 ' number of returned objects. 5 is the number of returned fields in @wquery call
svector(!objCount ) name
svector(!objCount ) freq
svector(!objCount ) start
svector(!objCount ) end
svector(!objCount ) source
!i=1
'parse formatted string to get individual object information
for %1 %2 %3 %4 %5 {formatted_results}
name(!i)= %1
freq(!i) = %2
start(!i) = %3
end(!i) = %4
source(!i) = %5
!i = !i+1
next
Who is online
Users browsing this forum: No registered users and 1 guest
