<?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: Simultaneous Format and Informat in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610740#M177909</link>
    <description>&lt;P&gt;An INFORMAT is used to convert text to values.&amp;nbsp; Once you have a variable in a SAS dataset the informat attached to the variable is of little value anymore.&amp;nbsp; It mainly will serve as documentation of how the variable was created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having an INFORMAT and a FORMAT which share the same name is possible, but does not mean they are compatible or even related.&amp;nbsp; In real usage it is probably rare that variables would have matching format and informat names anyway, other than the many that should have neither an informat or a format attached..&amp;nbsp; For most character variables there is no need to attach either an informat or a format.&amp;nbsp; Similarly for most numeric variables.&amp;nbsp; Unless you need to represent more than 11 significant digits or want to enforce a fixed number of decimal places on display.&amp;nbsp; The main need is for DATE, TIME and DATETIME values.&amp;nbsp; And there it is pretty normal to read the values using one format (or even one of the ANYDTxxx informats) and display with another.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Dec 2019 14:43:12 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-12-10T14:43:12Z</dc:date>
    <item>
      <title>Simultaneous Format and Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610735#M177905</link>
      <description>&lt;P&gt;I came across a SAS variable the other day that had both format and informat assigned to it. (I forgot to take a screenshot)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just curious that what happens if the format and informat are completely incompatible? Will the variable still be displayed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for asking a weird question...&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 14:19:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610735#M177905</guid>
      <dc:creator>aaronh</dc:creator>
      <dc:date>2019-12-10T14:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Format and Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610736#M177906</link>
      <description>&lt;P&gt;They can be "incompatible". Think of this: data from Excel was saved incorrectly to a csv, and you have the raw numbers for dates in there. So you read with the informat 5., add '30dec1899'd, and assign the yymmddd10. format to have a SAS date column.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 14:31:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610736#M177906</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-12-10T14:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Format and Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610738#M177908</link>
      <description>Thank you Kurt. So if I run a proc print, what format or informat will it display?..</description>
      <pubDate>Tue, 10 Dec 2019 14:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610738#M177908</guid>
      <dc:creator>aaronh</dc:creator>
      <dc:date>2019-12-10T14:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Format and Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610740#M177909</link>
      <description>&lt;P&gt;An INFORMAT is used to convert text to values.&amp;nbsp; Once you have a variable in a SAS dataset the informat attached to the variable is of little value anymore.&amp;nbsp; It mainly will serve as documentation of how the variable was created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having an INFORMAT and a FORMAT which share the same name is possible, but does not mean they are compatible or even related.&amp;nbsp; In real usage it is probably rare that variables would have matching format and informat names anyway, other than the many that should have neither an informat or a format attached..&amp;nbsp; For most character variables there is no need to attach either an informat or a format.&amp;nbsp; Similarly for most numeric variables.&amp;nbsp; Unless you need to represent more than 11 significant digits or want to enforce a fixed number of decimal places on display.&amp;nbsp; The main need is for DATE, TIME and DATETIME values.&amp;nbsp; And there it is pretty normal to read the values using one format (or even one of the ANYDTxxx informats) and display with another.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 14:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610740#M177909</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-12-10T14:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Format and Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610741#M177910</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274317"&gt;@aaronh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you Kurt. So if I run a proc print, what format or informat will it display?..&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It will not print either of them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will use the FORMAT attached to the variable to determine how to convert the values stored in the variable into the text needed to print.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 14:45:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610741#M177910</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-12-10T14:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Simultaneous Format and Informat</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610916#M178001</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274317"&gt;@aaronh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you Kurt. So if I run a proc print, what format or informat will it display?..&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It will not show you the names of the formats, but it will use the assigned format to display the values.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 08:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simultaneous-Format-and-Informat/m-p/610916#M178001</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-12-11T08:06:12Z</dc:date>
    </item>
  </channel>
</rss>

