Hi, I used sencode command in order to display the label's codes and text in the variable labels (in Hebrew).
sencode made the variable type numaric.
Now, I need to remove the numbers and keep only the text (to display in the graph)
I tried to run a loop but it is with string and of course it does not work.
What can I do? (sorry for the opposite table I struggled with the copy-past here).


Code:
sencode occupation_group, gene(occupation_group_name1_cat)
Code:
foreach i of varlist ocupation_group_name1_cat {
local a : variable label `i'
local a: subinstr local a  `.'
label var `i' ""
}

occupation_group_name1_cat| Freq. Percent Cum.
----------------------------------------+-----------------------------------
כלכלנים כלליים. 123 | 8 1.25 1.25
מזכירות ומנהלות לשכה.124 | 32 4.99 6.24
סטטיסטיקנים כללי.125 | 5 0.78 7.02
עובדי אמרכלות.126 | 24 3.74 10.76