Hi, I had problems when running the following code. The log showed 'WARNING: The variable AGE in the DROP, KEEP, or RENAME list has never been referenced.'. The dataset 'a1', '_age_v1' has already existed. I did not include the information of these datasets because they have nothing to do with the problem. I simplified my coding as well. _______________________________________________________________________ %let AGE = %str(attrib AGE length = 8 format = 3. label = "Age";); %let AGEU = %str(attrib AGEU length = $25 format = $25. label = "Age Units";); data temp; &AGE &AGEU; set a1; if (_n_ eq 1) then do; declare hash b2(dataset: "_age_v1"); b2.defineKey("STUDYID" ); b2.defineData("age", "ageu"); b2.defineDone(); call missing(age, ageu); end; run; data xx.test; retain STUDYID SUBJID SITEID AGE AGEU; set temp; keep STUDYID SUBJID SITEID AGE AGEU; run; ____________________END_____________________ Thanks! Suvan
... View more