<?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: create a data set with data entry in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/create-a-data-set-with-data-entry/m-p/583736#M166205</link>
    <description>&lt;P&gt;????&lt;/P&gt;
&lt;P&gt;Guess what is missing in this statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input name subject score;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 25 Aug 2019 07:20:06 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-08-25T07:20:06Z</dc:date>
    <item>
      <title>create a data set with data entry</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-data-set-with-data-entry/m-p/583734#M166203</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I create a data set but the&amp;nbsp; column area has no values in the data set that was created?&lt;/P&gt;
&lt;P&gt;What is wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tbl1;
infile datalines dlm='|';
length name $10 subject $20 score 8 area $10;
input name subject score;
datalines;
John|Math|98|EU
John|English|76|EU
John|Biology|81|EU
John|Physics|69|EU
John|Economics|79|EU
Tony|Math|65|USA
Tony|English|34|USA
Tony|Biology|87|USA
Tony|Physics|56|USA
Tony|Economics|90|USA
Jeff|Math|41|EU
Jeff|English|45|EU
Jeff|Biology|56|EU
Jeff|Physics|78|EU
Jeff|Economics|34|EU
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 25 Aug 2019 06:41:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-data-set-with-data-entry/m-p/583734#M166203</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-08-25T06:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: create a data set with data entry</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-data-set-with-data-entry/m-p/583736#M166205</link>
      <description>&lt;P&gt;????&lt;/P&gt;
&lt;P&gt;Guess what is missing in this statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input name subject score;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 25 Aug 2019 07:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-data-set-with-data-entry/m-p/583736#M166205</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-25T07:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: create a data set with data entry</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-data-set-with-data-entry/m-p/583737#M166206</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;;&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;said, you have forgotten AREA in the INPUT statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you coded it as an all-inclusive list (_ALL_), you wouldn't have:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tbl1 ;                                           
  informat name $10. subject $20. score 8. area $10. ;
  input (_all_) (:) ;                                 
  cards ;                                             
John Math      98 EU                                       
John English   76 EU                                    
John Biology   81 EU                                    
John Physics   69 EU                                    
John Economics 79 EU                                  
Tony Math      65 USA                                      
Tony English   34 USA                                   
Tony Biology   87 USA                                   
Tony Physics   56 USA                                   
Tony Economics 90 USA                                 
Jeff Math      41 EU                                       
Jeff English   45 EU                                    
Jeff Biology   56 EU                                    
Jeff Physics   78 EU                                    
Jeff Economics 34 EU                                  
run ;                                                 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Incidentally, you need neither the delimiter nor the INFILE statement with your input since you have no intervening blanks in your raw data. Plus, the proper instrument for reading raw data is INFORMAT rather than LENGTH. In your simple case the latter works, but if you had something more elaborate to read (date or datetime, say) it wouldn't.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;Paul D.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2019 07:47:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-data-set-with-data-entry/m-p/583737#M166206</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-08-25T07:47:42Z</dc:date>
    </item>
  </channel>
</rss>

