Copy the Description Field of a Series into a String

For questions regarding programming in the EViews programming language.

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

Moose
Posts: 2
Joined: Tue Aug 18, 2009 11:15 am

Copy the Description Field of a Series into a String

Postby Moose » Tue Aug 18, 2009 11:29 am

I'm trying to get the description from a series into a string, and unfortunately having a difficult time doing so. Essentially, I'd like to get the series description and store it as a string so I can then use it to label a chart. (Where the description is what you can see if you open a series then View->Label and it's the fourth element down in that table.) I can find how to set this, but can't seem to find how to pull it out and use it.

I'd also be happy if I could pull a Haver description directly from the database into a string.

Any help greatly appreciated. Thanks.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: Copy the Description Field of a Series into a String

Postby EViews Gareth » Tue Aug 18, 2009 11:34 am

You can freeze the label view of the series into a table, then extract the string from that table.

Moose
Posts: 2
Joined: Tue Aug 18, 2009 11:15 am

Re: Copy the Description Field of a Series into a String

Postby Moose » Tue Aug 18, 2009 11:58 am

Got it, thanks. That worked.

For anyone else who might be trying here is the code that I used:
if @isobject("tempfreeze") then
delete tempfreeze
endif
freeze(tempfreeze) {%stubSeriesName}.label
%description = tempfreeze(6,2)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests