<?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 which informat I should use? in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/which-informat-I-should-use/m-p/439869#M4707</link>
    <description>&lt;PRE&gt;data googlestat; 
infile '/folders/myfolders/preprocessedgooglestatstab.txt' dlm='09'x dsd firstobs=2; 
input DayofWeek $ Date MMDDYY10. Impressions 5. Clicks 2. Revenue COMMA10.1; 
run; 
proc print data=googlestat; 
run; &lt;/PRE&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder which informat I should use for DayofWeek so the next observation which is the date would not be in the same column as DayofWeek? Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 23 Feb 2018 21:40:07 GMT</pubDate>
    <dc:creator>jc3992</dc:creator>
    <dc:date>2018-02-23T21:40:07Z</dc:date>
    <item>
      <title>which informat I should use?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/which-informat-I-should-use/m-p/439869#M4707</link>
      <description>&lt;PRE&gt;data googlestat; 
infile '/folders/myfolders/preprocessedgooglestatstab.txt' dlm='09'x dsd firstobs=2; 
input DayofWeek $ Date MMDDYY10. Impressions 5. Clicks 2. Revenue COMMA10.1; 
run; 
proc print data=googlestat; 
run; &lt;/PRE&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder which informat I should use for DayofWeek so the next observation which is the date would not be in the same column as DayofWeek? Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 21:40:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/which-informat-I-should-use/m-p/439869#M4707</guid>
      <dc:creator>jc3992</dc:creator>
      <dc:date>2018-02-23T21:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: which informat I should use?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/which-informat-I-should-use/m-p/439883#M4708</link>
      <description>&lt;P&gt;The main thing is to use LIST MODE input statement. So either remove the informats from the INPUT statement, or add : modifier in front of them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You do not need to tell SAS to use an informat to read most values.&amp;nbsp; Your example has two values where it is useful, a date and number with embedded thousands separators.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your date values (at least the first few lines) can be read using the DATE informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note that if you are using LIST MODE input there is no need to specify the width on your INFORMAT since SAS will ignore them anyway.&amp;nbsp; In list mode it adjusts the informat width to match the width of the data for that field.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also you almost NEVER want to add a decimal specification to an informat.&amp;nbsp; Do you really want any integer values divided by 10?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also I like to use YYMMDD format to display dates to avoid confusion between locales that use MDY order and those that use DMY order.&amp;nbsp; Did you mean November 12th or the 10th of December?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data googlestat; 
  infile '/folders/myfolders/preprocessedgooglestatstab.txt'
     dlm='09'x dsd firstobs=2 truncover
  ;
  length DayofWeek $10 Date 8 Impressions 8 Clicks 8 Revenue 8;
  input DayofWeek Date :date. Impressions Clicks Revenue :comma.;
  format date yymmdd10.;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 22:30:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/which-informat-I-should-use/m-p/439883#M4708</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-23T22:30:27Z</dc:date>
    </item>
  </channel>
</rss>

