@replace question
Posted: Thu Oct 18, 2018 7:31 am
Hi all,
I have a long list of series in a work file. The series names are set up as a merger of concept and geography i.e. priceus, pricecan.
I'd like to create a string of all the series, and remove the common concept characters from each name in the string. I'm attempting to use the @replace command, but I'm not having any luck. In this instance the code I'm using is:
group g_all cat* '(all series that start with "cat")
%vars = g_all.@members 'create string of all series starting with cat
%vars = @replace(%vars,"cat","") 'replace characters "cat" with nothing
show %vars 'display contents of string to check that characters have been removed
However, the code is not working, and cat is not removed from any of the series when the string is displayed.
Any insight or help is appreciated.
Thanks!
Bob
I have a long list of series in a work file. The series names are set up as a merger of concept and geography i.e. priceus, pricecan.
I'd like to create a string of all the series, and remove the common concept characters from each name in the string. I'm attempting to use the @replace command, but I'm not having any luck. In this instance the code I'm using is:
group g_all cat* '(all series that start with "cat")
%vars = g_all.@members 'create string of all series starting with cat
%vars = @replace(%vars,"cat","") 'replace characters "cat" with nothing
show %vars 'display contents of string to check that characters have been removed
However, the code is not working, and cat is not removed from any of the series when the string is displayed.
Any insight or help is appreciated.
Thanks!
Bob