Hi,
Is it possible to reference objects in a workfile without knowing their name. So for example, say I open foreign data as a workfile, I then have a workfile that contains a number of series, can I apply the dlog operator to each series? I imagine it would be something along the lines of:
series dl1 = dlog(series_in_wf_array(1))
series dl2 = dlog(series_in_wf_array(2))
etc...
Or set a string variable to the first series name, so somnething like
%series1 = series_in_wf_array(1).name
Thanks,
Tom
Referencing objects in workfile EV6
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Referencing objects in workfile EV6
You can use the @wlookup function to obtain the names of the objects in the workfile.
Re: Referencing objects in workfile EV6
Thanks, but I'm using eviews 6 which doesn't seem to have that method.
I'm basically trying to loop through a number series and create new dlog series for each one. Struggling a little with the syntax.
T
I'm basically trying to loop through a number series and create new dlog series for each one. Struggling a little with the syntax.
T
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Referencing objects in workfile EV6
Sorry, didn't notice you were using EV6 (my fault!).
If you're only interested in series, you can create a group with all series in the workfile, then loop through the members of the loop one at a time:
If you're only interested in series, you can create a group with all series in the workfile, then loop through the members of the loop one at a time:
Code: Select all
group g *
for !i=1 to g.@count
%sn = g.@seriesname(!i)
'do something here
next
Re: Referencing objects in workfile EV6
Great, thanks
T
T
Who is online
Users browsing this forum: No registered users and 2 guests
