<?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: Variable format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146943#M262114</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;right,he just wanted to change the format not modify the entire data.&lt;/P&gt;&lt;P&gt;Thanks for the explanation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Nov 2013 01:24:37 GMT</pubDate>
    <dc:creator>Tal</dc:creator>
    <dc:date>2013-11-19T01:24:37Z</dc:date>
    <item>
      <title>Variable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146938#M262109</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;I have several variables and would like to change the format of one of the variables. I have tried the following code but am having some trouble getting it to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable I am trying to change to format 8. is called firmid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data sub_sample_1986;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format firmid 8.;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 04:21:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146938#M262109</guid>
      <dc:creator>wschnell1</dc:creator>
      <dc:date>2013-11-18T04:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Variable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146939#M262110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Are you sure you r not missing a set statement in your code? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 06:07:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146939#M262110</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-11-18T06:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Variable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146940#M262111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Proc datasets will let you change characteristics of variables such as label and fomrat in place without creating a new data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc datasets library=&amp;lt;library the dataset is in&amp;gt; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modify sub_sample_1986;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format firmid 8.; /*put as many variable name format combinations as you need here*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 16:47:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146940#M262111</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-11-18T16:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Variable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146941#M262112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is your code ballardw as efficient as this below?&amp;nbsp; Just curious&lt;/P&gt;&lt;P&gt;data sub_sample;&lt;/P&gt;&lt;P&gt;modify sub_sample;&lt;/P&gt;&lt;P&gt;format firmid 8.; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 18:05:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146941#M262112</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-11-18T18:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Variable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146942#M262113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Define "efficient" in this case. I think using MODIFY you're going through all of the observations in the data set, so execution time is going to depend on the number of records. With Proc datasets only the data set descriptor is affected and it takes basically the same amount of time to run with 10 records or 10billion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify is intended to modify, append or delete observations from a data set, in other words change the content.&lt;/P&gt;&lt;P&gt;It is worth remembering the note in the SAS documentation:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="strong"&gt;Damage to the SAS data set can occur if the system terminates abnormally during a DATA step that contains the MODIFY statement.&lt;/SPAN&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A name="a000854697"&gt;&lt;/A&gt;Observations in native SAS data files might have incorrect data values, or the data file might become unreadable.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc Datasets as called in this above manner only changes the descriptions of the variables: name, format, informat or label and will not actually change values or the number of observations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 20:05:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146942#M262113</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-11-18T20:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Variable format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146943#M262114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;right,he just wanted to change the format not modify the entire data.&lt;/P&gt;&lt;P&gt;Thanks for the explanation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 01:24:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-format/m-p/146943#M262114</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-11-19T01:24:37Z</dc:date>
    </item>
  </channel>
</rss>

