I figured out the solution by myself. I just needed a fresh mind. I even had to change the position within the program, that no variables are dropped, which I still need. %MACRO renam (dsin=,dsout=); PROC DATASETS LIB=MR NOLIST NOPRINT; CHANGE &dsin = &dsout; QUIT; PROC CONTENTS NOPRINT DATA=&dsout OUT=varout; run; PROC SQL noprint; SELECT name into :droplist FROM varout where format in ('DATE', 'TIME'); QUIT; DATA &DSOUT; SET &DSIN; DROP SUBJECTVISITID VISITID FORMID FORMINDEX VISITINDEX &droplist;; RUN; %MEND renam;
... View more