replace specific character in the name of a series
Posted: Fri Nov 18, 2016 2:44 am
Hi all,
I am completely new to eviews and figuring out how stuff works here. I have about 50 series named y_b_ar12, y_b_ar13, y_z_ar12....
I want eviews to loop through these series and change the b in the series name to z. Through google and trying I got the following code so far:
The problem is the @replace function, which returns no error but does not replace the b with the z, either.
It is probably a simple solution I am missing here, but I just cannot find it.
Any help is greatly appreciated.
Best,
I am completely new to eviews and figuring out how stuff works here. I have about 50 series named y_b_ar12, y_b_ar13, y_z_ar12....
I want eviews to loop through these series and change the b in the series name to z. Through google and trying I got the following code so far:
Code: Select all
group g y*
for !i=1 to g.@count
%oldname = g.@seriesname(!i)
%newname=@replace(%oldname,"*b*","*z*")
rename {%oldname} {%newname}
nextIt is probably a simple solution I am missing here, but I just cannot find it.
Any help is greatly appreciated.
Best,