Dear all,
I've stumbled about an annoying issue.
The following script loads the grunfeld data set which includes the
string-valued series "firmname".
Restricting the data set to a single firm (Chrysler), re-opening the
restricted and stored data set shows that "firmname" still comprises the
old meta data as the last print_array() function call shows. Still _all_
firm names are printed, and thus somehow stored on "firmname".
I guess the issue has (partly) to do with the (at least for me) special
behavior of strvals() which _always_ prints all distinct values of a
string-valued series irrespective of the underlying data set is
restricted or not.
This is with current git under Ubuntu.
<hansl>
clear
set verbose off
open grunfeld.gdt -q
function void print_array (const strings S)
loop foreach i S
print "$i"
endloop
end function
printf "\nPrint all distinct string-values of 'firmname'.\n"
print_array(strvals(firmname))
smpl firmname == "Chrysler" --restrict
store foo.gdt
printf "\n\nLoad restricted data set\n"
open foo.gdt -q -p
printf "\nPrint distinct string-valued firmnames.\n"
print_array(strvals(firmname)) # still incl. _all_ firm names
</hansl>
Artur