Hi, Interesting Question...initially i thought it was very easy to assign labels from one variable to another,but when i put my fingers on the key board,my brain stopped working.:smileysilly: any how I tried bellow code.i know this was lengthy and not so effective method also,but the good thing is it is working well.But I am getting "Variable is uninitialized" note in the log. Is there any way avoid this note,i mean could any one make some amendments to bellow code to prevent the Log note(Variable is uninitialized) ? Data t; input A A1 b c ; label A ="Test"; label C ="Test1"; A_char=put(A,1.); C_char=put(C,1.); cards; 2 5 5 9 4 8 8 8 ; run; Proc contents data=t out=lab(keep=name label where=(not missing(label))); run; Proc Sql; Select compress(Name||"_char"||"="||' " '||label||' " ') into : labs separated by ' ' from lab; quit; Data new; set T; label &labs; run; Thanks for your time.. Reagrds, Sanjeev.K Message was edited by: Sanjeev Kuridi
Code working perfect now.
I have updated the code as Art suggested.
... View more