<?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: Changing Format and Informat in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Changing-Format-and-Informat/m-p/850378#M336080</link>
    <description>&lt;P&gt;Once the variables are in a SAS data set, further changing of the informat is useless, it has no impact. So don't do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To change the format of a variable from $13. to $12. (why?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets library=WORK; /* Or whatever the proper library name is */
&amp;nbsp; &amp;nbsp; modify have; /* Or whatever the proper data set name is */
&amp;nbsp; &amp;nbsp; format var_b $12.;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also change the format in procedures where this variable is used. The only real impact of changing format from $13. to $12. is to chop off the last character, is that really what you want?&lt;/P&gt;</description>
    <pubDate>Mon, 19 Dec 2022 20:02:02 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-12-19T20:02:02Z</dc:date>
    <item>
      <title>Changing Format and Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Format-and-Informat/m-p/850377#M336079</link>
      <description>&lt;P&gt;Dear All:&lt;/P&gt;&lt;P&gt;I have two variables and I want to change the format and informat of these variable&lt;/P&gt;&lt;P&gt;VarA has&amp;nbsp;&lt;/P&gt;&lt;P&gt;Format BEST12. INFORMAT BEST32.&lt;/P&gt;&lt;P&gt;I want to change it to BEST12. and BEST12.&lt;/P&gt;&lt;P&gt;Var_B has $13. as the format and $13. as the INFORMAT&lt;/P&gt;&lt;P&gt;I want to change it to&amp;nbsp;&lt;/P&gt;&lt;P&gt;$12. as the format and $12. as the Informat&lt;/P&gt;&lt;P&gt;Can someone please help&lt;/P&gt;&lt;P&gt;Randy&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 19:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Format-and-Informat/m-p/850377#M336079</guid>
      <dc:creator>RandyStan</dc:creator>
      <dc:date>2022-12-19T19:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Format and Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Format-and-Informat/m-p/850378#M336080</link>
      <description>&lt;P&gt;Once the variables are in a SAS data set, further changing of the informat is useless, it has no impact. So don't do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To change the format of a variable from $13. to $12. (why?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets library=WORK; /* Or whatever the proper library name is */
&amp;nbsp; &amp;nbsp; modify have; /* Or whatever the proper data set name is */
&amp;nbsp; &amp;nbsp; format var_b $12.;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also change the format in procedures where this variable is used. The only real impact of changing format from $13. to $12. is to chop off the last character, is that really what you want?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 20:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Format-and-Informat/m-p/850378#M336080</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-19T20:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Format and Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Format-and-Informat/m-p/850379#M336081</link>
      <description>&lt;P&gt;You can use PROC DATASETS to make your changes, for example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data one; &lt;BR /&gt;x=100; &lt;BR /&gt;format x percent.; &lt;BR /&gt;run; &lt;BR /&gt;&lt;BR /&gt;proc datasets lib=work nolist; &lt;BR /&gt;modify one; &lt;BR /&gt;format x best3.; &lt;BR /&gt;quit; &lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 20:01:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Format-and-Informat/m-p/850379#M336081</guid>
      <dc:creator>russt_sas</dc:creator>
      <dc:date>2022-12-19T20:01:19Z</dc:date>
    </item>
  </channel>
</rss>

