<?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: Noob Question- Basic SAS-How to display and INPUT- But need help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332423#M74819</link>
    <description>&lt;P&gt;If you're trying to read in a csv file, in which the first row are variable/column names, I'd suggest learning about proc import.&amp;nbsp; Then you can go on to the subsequent tasks.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2017 23:37:01 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2017-02-13T23:37:01Z</dc:date>
    <item>
      <title>Noob Question- Basic SAS-How to display and INPUT- But need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332418#M74817</link>
      <description>&lt;P&gt;I am new to SAS, and i have a problem I am trying to resolve. I have parts of it done but i keep getting errors and i thought why not post it on here, most i can do is get laughed at because i dont know SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Write&amp;nbsp;&lt;/STRONG&gt;a SAS®&amp;nbsp;program to access the Microsoft®&amp;nbsp;Excel® spreadsheet and select these four specific data items:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Male, worked full-time with earnings of $55,000 to $100,000 or more population estimate&lt;/LI&gt;&lt;LI&gt;Female, worked full-time with earnings of $55,000 to $100,000 or more population estimate&lt;/LI&gt;&lt;LI&gt;Male, worked full-time other category with earnings of $55,000 to $100,000 or more population estimate&lt;/LI&gt;&lt;LI&gt;Female, worked full-time other category with earnings of $55,000 to $100,000 or more population estimate&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Create&lt;/STRONG&gt;&amp;nbsp;a comma-delimited raw data file to store information that includes gender, earnings categories, and number of individuals in each category for only the data indicated above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i have done so far is attached in a comma delimited file as far as my excel sheet, I am not getting how to list these out and retrieve the data in a table. So far the code below is the best i have come up with for this resolution. Any help would be grand and appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Auglaize;

    infile ' /home/ktylu10/sasuser.v94/Week 2 Individual Auglaize County.csv’ dlm=',' firstobs=2;

    input ? : $char# ? : $char# ? : $char#  ? : $char#;

run;

proc print data=Auglaize;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 23:19:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332418#M74817</guid>
      <dc:creator>SixUnder</dc:creator>
      <dc:date>2017-02-13T23:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Noob Question- Basic SAS-How to display and INPUT- But need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332421#M74818</link>
      <description>&lt;P&gt;When you receive ERRORs, it is best to post the log from the offending step(s).&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 23:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332421#M74818</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-13T23:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Noob Question- Basic SAS-How to display and INPUT- But need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332423#M74819</link>
      <description>&lt;P&gt;If you're trying to read in a csv file, in which the first row are variable/column names, I'd suggest learning about proc import.&amp;nbsp; Then you can go on to the subsequent tasks.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 23:37:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332423#M74819</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-02-13T23:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Noob Question- Basic SAS-How to display and INPUT- But need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332424#M74820</link>
      <description>&lt;P&gt;1) I think the Forum treats that a xls as when I do a save target as from the browser the file name looks ends in XLS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recommend using the import wizard the first time to bring the data into sas. Look in the File menu for Import data.&amp;nbsp;That will generate a program to read the data that will appear in the Log. You could copy the text from the log to the editor and edit as needed.&lt;/P&gt;
&lt;P&gt;It will look something like:&lt;/P&gt;
&lt;PRE&gt;data WORK.AUGL                                    ;
%let _EFIERR_ = 0; /* set the ERROR detection macro variable */
infile '&amp;lt;path&amp;gt;\Auglaize County 2.csv' delimiter = ',' MISSOVER DSD lrecl=32767  firstobs=2 ;
   informat Gender $7. ;
   informat Income $14. ;
   informat Fulltime best32. ;
   informat Other best32. ;
   format Gender $7. ;
   format Income $14. ;
   format Fulltime best12. ;
   format Other best12. ;
input
            Gender $
            Income $
            Fulltime
            Other
;
if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
run;&lt;/PRE&gt;
&lt;P&gt;You can save the program to run later as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 23:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332424#M74820</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-02-13T23:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Noob Question- Basic SAS-How to display and INPUT- But need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332449#M74829</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Auglaize;
    infile '/home/ktylu10/sasuser.v94/Week 2 Individual Auglaize County Jason.csv’ dlm=',' firstobs=2;
    Input Gender :$6. Income :$20. Fulltime 8:$15 comma8.0;

run;

proc print data=Auglaize;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;55&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;56 data Auglaize;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;57 infile '/home/ktylu10/sasuser.v94/Week 2 Individual Auglaize County Jason.csv’ dlm=',' firstobs=2;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;58 Input Gender :$6. Income :$20. Fulltime 8:$15 comma8.0;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;59&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;60 run;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;61&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;62 proc print data=Auglaize;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;63&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;57 infile '/home/ktylu10/sasuser.v94/Week 2 Individual Auglaize County Jason.csv’ dlm=',' firstobs=2;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_&lt;/DIV&gt;&lt;DIV class="sasError"&gt;23&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 23-2: Invalid option name ,.&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Feb 2017 02:03:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332449#M74829</guid>
      <dc:creator>SixUnder</dc:creator>
      <dc:date>2017-02-14T02:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Noob Question- Basic SAS-How to display and INPUT- But need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332478#M74844</link>
      <description>&lt;P&gt;The log doesn't match the code posted?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please make sure the exact code and log are included.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 05:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332478#M74844</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-02-14T05:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Noob Question- Basic SAS-How to display and INPUT- But need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332486#M74848</link>
      <description>&lt;P&gt;The closing quote at the end of your infile name is not a standard single quote. Try this instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Auglaize;
    infile '/home/ktylu10/sasuser.v94/Week 2 Individual Auglaize County Jason.csv' dlm=',' firstobs=2;
    Input Gender :$6. Income :$20. Fulltime 8:$15 comma8.0;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 06:52:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332486#M74848</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-14T06:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Noob Question- Basic SAS-How to display and INPUT- But need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332488#M74850</link>
      <description>&lt;P&gt;I uploaded your .csv (which is in DOS format with CRLFs, something you should correct if you try to read on UNIX) to my UNIX server using text mode (converts the CRLF to LF) and ran this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data auglaize;
infile '$HOME/sascommunity/auglaize_county_2.csv' dlm=',' firstobs=2 ;
input gender :$6. income :$20. fulltime other;
run;

proc print data=auglaize noobs;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The result:&lt;/P&gt;
&lt;PRE&gt;gender        income        fulltime    othe

Male      55000 to 64999      1041       203
Male      65000-74999          712       199
Male      75000-99999         1168       159
Male      100000 or more        39       112
Female    55000 to 64999       572       241
Female    65000-74999          230       104
Female    75000-99999          213        91
Female    100000 or more       125        39
&lt;/PRE&gt;
&lt;P&gt;Note that I replaced the stupid blanks in the filename with underlines. Is much easier to handle during file operations on the OS level.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 07:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Noob-Question-Basic-SAS-How-to-display-and-INPUT-But-need-help/m-p/332488#M74850</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-14T07:05:29Z</dc:date>
    </item>
  </channel>
</rss>

