<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Question about assigning labels in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139796#M28184</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'ts not difficult but there is no function to assign a label in a data step.&amp;nbsp; How many variables are you converting?&amp;nbsp; How many different informats?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jan 2014 18:08:59 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2014-01-13T18:08:59Z</dc:date>
    <item>
      <title>Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139790#M28178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am converting a character variable to numeric and want the numeric variable to have the same label as the character variable but am not sure how to do this. See example code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data blah(drop=var1_c); set blahblah(rename=(var1=var1_c));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var1=input(var1_c,1.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; label var1=&lt;STRONG&gt;*same label as var1_c*&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 17:08:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139790#M28178</guid>
      <dc:creator>spirto</dc:creator>
      <dc:date>2014-01-13T17:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139791#M28179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the call label routine.&amp;nbsp; It is documented at: &lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000127812.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000127812.htm"&gt;SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax is simply:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="strong" style="font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; font-weight: bold; color: #000000; background-color: #ffffff;"&gt;CALL LABEL&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="emph" style="font-style: italic; color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;variable1&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="emph" style="font-style: italic; color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;variable2&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;which assigns the label from variable1 to the character variable variable2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; line-height: 16.799999237060547px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 17:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139791#M28179</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-01-13T17:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139792#M28180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that will do what &lt;A __default_attr="810423" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; wants.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 17:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139792#M28180</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-01-13T17:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139793#M28181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You seek the "holly grail" of type conversion. :smileymischief: &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 17:41:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139793#M28181</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-01-13T17:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139794#M28182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct. I tried Art's suggestion and it did not work. @data_null_: im assuming that this conversion is something that everyone wants but there is no easy solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 17:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139794#M28182</guid>
      <dc:creator>spirto</dc:creator>
      <dc:date>2014-01-13T17:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139795#M28183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use vlabel to get the label in one step and then a proc datasets to assign the label but still not really nice in many ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data blah(drop=var1_c); set blahblah(rename=(var1=var1_c));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var1=input(var1_c,1.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call symput (var1_label, vlabel(var1_c));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc datasets lib =work nolist nodetails;&lt;/P&gt;&lt;P&gt;modify blah;&lt;/P&gt;&lt;P&gt;label var1="&amp;amp;var1_label";&lt;/P&gt;&lt;P&gt;run; quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 18:07:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139795#M28183</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-01-13T18:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139796#M28184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'ts not difficult but there is no function to assign a label in a data step.&amp;nbsp; How many variables are you converting?&amp;nbsp; How many different informats?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 18:08:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139796#M28184</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-01-13T18:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139797#M28185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usually converting 5-6 variables per dataset. Not using any informats since the variables are already coming from a SAS dataset. So really I am not converting too many variables but its five too many to label manually :smileysilly:.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 18:21:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139797#M28185</guid>
      <dc:creator>spirto</dc:creator>
      <dc:date>2014-01-13T18:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139798#M28186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would something like this work for you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings10/047-2010.pdf"&gt;http://support.sas.com/resources/papers/proceedings10/047-2010.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 18:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139798#M28186</guid>
      <dc:creator>Fugue</dc:creator>
      <dc:date>2014-01-13T18:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139799#M28187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for not having first tested my suggestion.&amp;nbsp; You and DN are definitely correct, it won't work as I suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However John's paper, as referenced by &lt;A __default_attr="808378" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;, should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you only have one variable that you want to reassign a label to, the following will also work (yes, I did test it this time):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data blahblah;&lt;/P&gt;&lt;P&gt;&amp;nbsp; label var1='first variable';&lt;/P&gt;&lt;P&gt;&amp;nbsp; input var1 $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;filename relabel temp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set blahblah;&lt;/P&gt;&lt;P&gt;&amp;nbsp; file relabel;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length label $32;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call label(var1,label);&lt;/P&gt;&lt;P&gt;&amp;nbsp; put "data blah (drop=var1_c);";&lt;/P&gt;&lt;P&gt;&amp;nbsp; put "set blahblah (rename=var1=var1_c);";&lt;/P&gt;&lt;P&gt;&amp;nbsp; put "label var1=:"@;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put label @;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put ";";&lt;/P&gt;&lt;P&gt;&amp;nbsp; put "var1=input(var1_c,1.);";&lt;/P&gt;&lt;P&gt;&amp;nbsp; put "run;";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%include relabel;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 18:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139799#M28187</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-01-13T18:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139800#M28188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for your suggestions. I was hoping there was a function to the likes of label var1=getlabel(var1_c); but wouldn't we all &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 19:44:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139800#M28188</guid>
      <dc:creator>spirto</dc:creator>
      <dc:date>2014-01-13T19:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139801#M28189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thing this technique is interesting and demonstrates interesting features, and default behavior, of PROC TRANSPOSE. &lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 8pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;datasets&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;kill&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; noprint &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;nolist&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;quit&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; class;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;infile&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;cards&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;dsd&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; (Name Sex Age Height Weight) (:&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;$8.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;attrib&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; age&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'Age (years)'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;attrib&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; height&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'Height (inches)'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;attrib&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; weight&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'Weight (lbs.)'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;attrib&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; sex&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'Gender'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;cards&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffc0;"&gt;"Alfred","M","14","69","112.5"&lt;BR /&gt;"Alice","F","13","56.5","84"&lt;BR /&gt;"Barbara","F","13","65.3","98"&lt;BR /&gt;"Carol","F","14","62.8","102.5"&lt;BR /&gt;"Henry","M","14","63.5","102.5"&lt;BR /&gt;"James","M","12","57.3","83"&lt;BR /&gt;"Jane","F","12","59.8","84.5"&lt;BR /&gt;"Janet","F","15","62.5","112.5"&lt;BR /&gt;"Jeffrey","M","13","62.5","84"&lt;BR /&gt;"John","M","12","59","99.5"&lt;BR /&gt;"Joyce","F","11","51.3","50.5"&lt;BR /&gt;"Judy","F","14","64.3","90"&lt;BR /&gt;"Louise","F","12","56.3","77"&lt;BR /&gt;"Mary","F","15","66.5","112"&lt;BR /&gt;"Philip","M","16","72","150"&lt;BR /&gt;"Robert","M","12","64.8","128"&lt;BR /&gt;"Ronald","M","15","67","133"&lt;BR /&gt;"Thomas","M","11","57.5","85"&lt;BR /&gt;"William","M","15","66.5","112"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;;;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;transpose&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=class &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=tall;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Name;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;copy&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Sex;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Age Height Weight;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; convert / &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;view&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=convert;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; tall;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; num1 = input(col1,&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;comma16.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;transpose&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=convert &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=class2(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=_name_);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Name;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;copy&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Sex;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; num1;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 11:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139801#M28189</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-01-14T11:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139802#M28190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Personally I have a utility macro function I have been using for 15 years that will return information about a particular variable from an existing dataset which makes this problem easy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data blah(drop=var1_c);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set blahblah(rename=(var1=var1_c));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var1=input(var1_c,1.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; label var1=&lt;STRONG&gt;"%varexist(blahblah,var1,label)";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 14:27:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139802#M28190</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-01-14T14:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139803#M28191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom, is your macro publicly available?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 15:43:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139803#M28191</guid>
      <dc:creator>spirto</dc:creator>
      <dc:date>2014-01-14T15:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139804#M28192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;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:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;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 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva; color: #0070c0; font-size: 10pt;"&gt;"Variable is uninitialized" &lt;SPAN style="color: #000000;"&gt;note in the log.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: verdana,geneva;"&gt;Is there any way avoid this note,i mean could any one make some amendments to bellow code to prevent the Log note(Variable&amp;nbsp; is uninitialized) ? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; t;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; A A1 b c ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; A =&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;"Test"&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; C =&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;"Test1"&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;A_char=put(A,&lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;C_char=put(C,&lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;2 5 5 9&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;4 8 8 8&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;Proc &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;contents &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;=t &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;=lab(keep=name label &lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10pt; background: white; font-family: Consolas;"&gt;where=(not missing(label)));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;Proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;Sql&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;Select&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; compress(Name||&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;"_char"&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;"="&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;' " '&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;||label||&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;' " '&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;&amp;nbsp; : labs separated &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;by&lt;/SPAN&gt; &lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;' '&lt;/SPAN&gt; &lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; lab;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; new;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; T;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; &amp;amp;labs;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;Thanks for your time..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;Reagrds,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;Sanjeev.K&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Sanjeev Kuridi&#xD;
&#xD;
Code working perfect now.&#xD;
I have updated the code as Art suggested.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 05:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139804#M28192</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2014-01-16T05:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139805#M28193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;You can use vlabel to get the label in one step and then a proc datasets to assign the label&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;.The Following Is My code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data chk;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input var_C $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; label var_c="First Variable";&lt;/P&gt;&lt;P&gt;&amp;nbsp; datalines;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;56&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data chk1(drop=var1_cC);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set chk (rename=(var_c=var1_CC));&lt;/P&gt;&lt;P&gt;&amp;nbsp; var_N=input(var1_CC,6.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symput ("var1_label",vlabel(var1_cC));&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;var1_label;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc datasets lib =work nolist nodetails;&lt;/P&gt;&lt;P&gt;modify chk1;&lt;/P&gt;&lt;P&gt;label var_N="&amp;amp;var1_label";&lt;/P&gt;&lt;P&gt;run; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Any concern Pls Let Me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dishant Parikh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 06:10:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139805#M28193</guid>
      <dc:creator>dishant</dc:creator>
      <dc:date>2014-01-16T06:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139806#M28194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="4777" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;: limit what is output from proc compare.&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc contents data=t &lt;/P&gt;&lt;P&gt; out=lab(keep=name label where=(not missing(label)));;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 06:12:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139806#M28194</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-01-16T06:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139807#M28195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;Thanks a lot&amp;nbsp; &lt;A __default_attr="149594" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; !!!!...Sounds pretty Simple....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;Not Sure how&amp;nbsp; i missed this...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;Sanjeev.k&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 06:23:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139807#M28195</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2014-01-16T06:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Question about assigning labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139808#M28196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%macro varexist(ds,var,info);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%local dsid rc varnum;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%*----------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Use the SYSFUNC macro to execute the SCL OPEN, VARNUM,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;other variable information and CLOSE functions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;-----------------------------------------------------------------------;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%let dsid = %sysfunc(open(&amp;amp;ds));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%if (&amp;amp;dsid) %then %do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; %let varnum = %sysfunc(varnum(&amp;amp;dsid,&amp;amp;var));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; %if (&amp;amp;varnum) &amp;amp; %length(&amp;amp;info) %then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %sysfunc(var&amp;amp;info(&amp;amp;dsid,&amp;amp;varnum))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; %else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;varnum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; %let rc = %sysfunc(close(&amp;amp;dsid));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%else 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%mend varexist;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jan 2014 03:36:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-assigning-labels/m-p/139808#M28196</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-01-19T03:36:38Z</dc:date>
    </item>
  </channel>
</rss>

