<?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 Retain table label in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Retain-table-label/m-p/146862#M29175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a simple way to change this code so that the table label for the new &amp;amp;ds will be the same as for the old &amp;amp;ds, before the data step executed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data &amp;amp;ds;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set &amp;amp;ds;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Additional processing */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jan 2014 16:11:46 GMT</pubDate>
    <dc:creator>mdrichar</dc:creator>
    <dc:date>2014-01-20T16:11:46Z</dc:date>
    <item>
      <title>Retain table label</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Retain-table-label/m-p/146862#M29175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a simple way to change this code so that the table label for the new &amp;amp;ds will be the same as for the old &amp;amp;ds, before the data step executed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data &amp;amp;ds;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set &amp;amp;ds;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Additional processing */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 16:11:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Retain-table-label/m-p/146862#M29175</guid>
      <dc:creator>mdrichar</dc:creator>
      <dc:date>2014-01-20T16:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Retain table label</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Retain-table-label/m-p/146863#M29176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try storing the original label, then making use of it later, e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data class(label='Class subset');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; set sashelp.class;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; where name=:'J';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%let ds=work.class;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc sql noprint;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; select memlabel into :classlabel&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; from dictionary.tables&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; /*where libname='WORK'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and memname=upcase("&amp;amp;ds")*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; where cats(libname,'.',memname)=upcase("&amp;amp;ds")&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;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data &amp;amp;ds(label="&amp;amp;classlabel");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; set &amp;amp;ds;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If &amp;amp;ds is a one level data set name (i.e. no libname specified) then you can use the &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;commented&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;where clause &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;instead,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;that is in the proc sql.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 18:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Retain-table-label/m-p/146863#M29176</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2014-01-20T18:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Retain table label</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Retain-table-label/m-p/146864#M29177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to update the data set without losing the label, don't replace it like that.&lt;/P&gt;&lt;P&gt;Update it.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;to update the descriptor portion (names, labels and formats) you have PROC DATASETS (see &lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a000247753.htm"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a000247753.htm )&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to update data values within the table you have 2 choices (I believe) &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;data step statement MODIFY&amp;nbsp; &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/a000173361.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/a000173361.htm&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;update data with PROC SQL&amp;nbsp; &lt;A href="http://support.sas.com/documentation/cdl/en/sqlproc/65065/HTML/default/n1hz0uhw57yye2n16m5r103jjpjj.htm"&gt;http://support.sas.com/documentation/cdl/en/sqlproc/65065/HTML/default/n1hz0uhw57yye2n16m5r103jjpjj.htm&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 08:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Retain-table-label/m-p/146864#M29177</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-01-22T08:22:44Z</dc:date>
    </item>
  </channel>
</rss>

