- data a;
- input date ss sdad asd12 ;
- datalines;
- 1 2 3 4
- 5 6 7 8
- 9 10 11 12
- ;
- run;
- data b;
- length code $32;
- set a;
- array s _numeric_;
- do over s;
- if vname(s)^="date" then do;
- code=vname(s);
- var_a=s;
- output;
- end;
- end;
- keep code date var_a;
- run;
- proc sort data=b;by code date;run;quit;