12-20-2016 08:40 AM
I have a set of columns with countries' names abbreviation and cycle (116 for eg) and I try to cut this dataset into pieces where each table will represent one country. I believe this can be managed with either IF or Where stament but I do not know how to reference column names dynamically.
Any idea how to manage this?
Attached is the file demonstrating the structure of original table.
12-20-2016 08:50 AM - edited 12-20-2016 09:11 AM
reference by the country name and double dot BG_: means every column starting with BG_
data BGs(keep = BG_:) CZs(keep = CZ_:) DEs(keep = DE_:) HUs(keep = HU_:) PLs(keep = PL_:); set BIGDATASET; run;
creates 5 sets with columns respective to countries
12-20-2016 09:23 AM
Look into BY group processing to avoid the need to do this.