<?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 How does formatted input work? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166266#M32036</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How does the variable weight has the value 2 in the following example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input @1 height 2. &lt;STRONG&gt;@4 weight 2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;72 95&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Height&amp;nbsp;&amp;nbsp;&amp;nbsp; Weight&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 72&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any special usage of formatted input when there is no period in the numeric informat ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Apr 2014 07:00:14 GMT</pubDate>
    <dc:creator>Sanyam</dc:creator>
    <dc:date>2014-04-03T07:00:14Z</dc:date>
    <item>
      <title>How does formatted input work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166266#M32036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How does the variable weight has the value 2 in the following example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input @1 height 2. &lt;STRONG&gt;@4 weight 2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;72 95&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Height&amp;nbsp;&amp;nbsp;&amp;nbsp; Weight&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 72&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any special usage of formatted input when there is no period in the numeric informat ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 07:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166266#M32036</guid>
      <dc:creator>Sanyam</dc:creator>
      <dc:date>2014-04-03T07:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: How does formatted input work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166267#M32037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"2" is not a format, it is a value. "2." is a format. A format MUST be called with a dot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 07:24:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166267#M32037</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-04-03T07:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: How does formatted input work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166268#M32038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kurt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is correct that we must use informat with a dot/period.&lt;/P&gt;&lt;P&gt;But I need to know how SAS works behind the scenes when the informat is without a dot or how the column pointer moves in that case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an alternative to the above example, if I use 1 instead of 2 then the output value for&amp;nbsp; variable weight is 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; input @1 height 2. &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;@4 weight 1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;datalines;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;72 95&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;;&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;STRONG style="font-style: inherit; font-family: inherit;"&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Height&amp;nbsp;&amp;nbsp;&amp;nbsp; Weight&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; 72&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 08:16:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166268#M32038</guid>
      <dc:creator>Sanyam</dc:creator>
      <dc:date>2014-04-03T08:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: How does formatted input work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166269#M32039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since "1" or "2" is not a format, but a value, and follows a variable name, it is interpreted by the input statement as a column. Therefore you read the contents of columns 2 and 1, respectively, which happen to be 2 and 7.&lt;/P&gt;&lt;P&gt;An "informat" without a dot is not an informat, it is ALWAYS something else.&lt;/P&gt;&lt;P&gt;The only time you write a format/informat name without a dot is when specifying it in proc format at creation time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited a typo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 08:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166269#M32039</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-04-03T08:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: How does formatted input work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166270#M32040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kurt, I got the point that it reads at the value particular column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I am curious to know why SAS does this unexpected thing and also doesn't show any NOTE in SAS log.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 08:41:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166270#M32040</guid>
      <dc:creator>Sanyam</dc:creator>
      <dc:date>2014-04-03T08:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: How does formatted input work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166271#M32041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not unexpected behaviour, just see the SAS documentation for the input statement:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000146292.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000146292.htm"&gt;SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Go to "Input Styles - Column Input".&lt;/P&gt;&lt;P&gt;Since it can do what the code told it to do without problems, SAS sees no need for NOTE, WARNING or ERROR messages.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 09:02:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166271#M32041</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-04-03T09:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: How does formatted input work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166272#M32042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kurt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I completely misjudged it and didn't think it that it was a 'Column Input'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 09:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-does-formatted-input-work/m-p/166272#M32042</guid>
      <dc:creator>Sanyam</dc:creator>
      <dc:date>2014-04-03T09:21:20Z</dc:date>
    </item>
  </channel>
</rss>

