sorry guys.. i have given NOTAB in the DDE statement and used '09'x only for the truble making character variable. there i got mistaken. after i gave '09'x after every variable listed in the put statement.. correct result generated... data abc; input age 1-2 salary 4-8 name $ 10-25 ; cards; 35 60000 siva chnd guva 38 50000 manu gede ali ; run; %macro automation(sht,ds,r1,c1,r2,c2,var,cond); filename ciprod dde "excel|C:\OFFICE\RRS\[difference.xlsx]&sht.!r&r1.c&c1.:r&r2.c&c2." NOTAB; data _null_; file ciprod; set &ds.; put &var.; &cond.; run; %mend automation; %automation(Employee_Data,abc,2,1,3,3,age '09'x name '09'x salary,) Above code worked as expected. thank you @FreelanceReinh and @Reeza fpor your help and support.
... View more