0

I have a dataset with over 400 variables and i want to create a subset with selected variables.

example: - I want to subset into new dataset only those variables that ends in M1,M2,M3 from the following dataset using PROC SQL.Please help me with this.

PRODUCT_ID   CCL_M1  CCL_M2  CCL_M3  DCL_M1   DCL_M2    DCL_M3 DCL_M4 DCL_M5
102107083      0       0       278     242     208        107     9     0
102107083      0       0        0       0       0           0     0     0
102107083      53      47       51      0       0           0     0     0
102119004      0       0        0       0       0           0     0     0
102119004      0       0        6       0       0           0     0     0
102119004     73       113      38      0       0           0     0     0
102130021     193      203      179     193     287        194    119   74
102130021     11        2       77      0       0           0     0     0
Aman kashyap
  • 143
  • 1
  • 3
  • 12
  • 2
    Please do a bit of basic research and make an attempt to solve your problems yourself before posting questions. [Data-driven programming](https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/1653-2018.pdf) is what you're looking for here. – user667489 Apr 30 '18 at 13:57
  • Thanks Sir @user667489! – Aman kashyap Apr 30 '18 at 14:05

0 Answers0