<?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: Reading from Raw Data Files in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/263745#M57749</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;SPAN&gt;cynthia,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;please explain the how pointer is reading the data. i am unable to comprehend the outcome. please help.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Apr 2016 03:27:41 GMT</pubDate>
    <dc:creator>Ashwani_singh</dc:creator>
    <dc:date>2016-04-14T03:27:41Z</dc:date>
    <item>
      <title>Reading from Raw Data Files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100358#M28216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Given the raw data file EMPLOYEE:&lt;/P&gt;&lt;P&gt;----I----1 0---I----20---I----30&lt;/P&gt;&lt;P&gt;Ruth 39 11&lt;/P&gt;&lt;P&gt;Jose 32 22&lt;/P&gt;&lt;P&gt;Sue 30 33&lt;/P&gt;&lt;P&gt;John 40 44&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following SAS program is submitted:&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;infile `employee';&lt;/P&gt;&lt;P&gt;input employee_name $ 1-4;&lt;/P&gt;&lt;P&gt;if employee_name = `Ruth' then input idnum 10-11;&lt;/P&gt;&lt;P&gt;else input age 7-8;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;What value does the variable IDNUM contain when the name of the employee is "Ruth"?&lt;/P&gt;&lt;P&gt;A. 11&lt;/P&gt;&lt;P&gt;B. 22&lt;/P&gt;&lt;P&gt;C. 33&lt;/P&gt;&lt;P&gt;D. (missing numeric value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for answering in advance,&lt;/P&gt;&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Aug 2013 21:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100358#M28216</guid>
      <dc:creator>GavyK</dc:creator>
      <dc:date>2013-08-04T21:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from Raw Data Files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100359#M28217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; There is a HUGE difference between showing the data in a "fixed pitch" font and showing the data in a proportional spaced font, especially when your INPUT statement uses column positions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Again, to find out the answer to this question, you would type the data into a file, save the file as EMPLOYEES on your hard drive. Then probably amend the INFILE statement to use a fully qualified path. So, for example, if you save EMPLOYEES into c:\temp, the only modification would be to alter the INFILE statement: INFILE 'C:\temp\employees';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Instead of answering the question for you, I am curious what results you discovered when you ran the program.&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Aug 2013 22:06:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100359#M28217</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-08-04T22:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from Raw Data Files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100360#M28218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did run the program and it gave a data error. See log message below:&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for idnum in line 3 1-2.&lt;/P&gt;&lt;P&gt;RULE:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jose 32 22 10&lt;/P&gt;&lt;P&gt;employee_name=Ruth idnum=. age=. _ERROR_=1 _N_=1&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for age in line 7 1-2.&lt;/P&gt;&lt;P&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; John 40 44 10&lt;/P&gt;&lt;P&gt;employee_name=Sue idnum=. age=. _ERROR_=1 _N_=2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is unconvincing is the IF-THEN logic being used, which obviously makes me question the authenticity of online sample papers available for Base SAS exam. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;if employee_name = `Ruth' then input idnum 10-11;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;else input age 7-8;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks, anyways, Cynthia. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 02:38:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100360#M28218</guid>
      <dc:creator>GavyK</dc:creator>
      <dc:date>2013-08-05T02:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from Raw Data Files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100361#M28219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cynthia and everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am preparing for Base SAS certification exam and was looking for a few practice papers. Would you like to recommend any useful sites, links from where I could access sample questions either free of charge or maybe paid(but not too expensive!)? &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much Appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gavy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 02:42:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100361#M28219</guid>
      <dc:creator>GavyK</dc:creator>
      <dc:date>2013-08-05T02:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from Raw Data Files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100362#M28220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forgot to add that after running the program, the output window showed missing values for the variables IDNUM and AGE. NAMES did appear though. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gavy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 02:44:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100362#M28220</guid>
      <dc:creator>GavyK</dc:creator>
      <dc:date>2013-08-05T02:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from Raw Data Files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100363#M28221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless the actual question has an indication that the lines are shorter than 11 characters then you cannot tell if the right answer is D or None of the above.&lt;/P&gt;&lt;P&gt;If we replace the spaces with periods the actual input line for "Ruth" could be either of the lines below. In the first the value will be missing as it will try to read from the next line when it runs out of characters.&amp;nbsp; In the second example the value will be 1 since it reads '1 ' from columns 10 and 11.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;----|----10---|----20---|----30&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Ruth.39.11&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'courier new', courier;"&gt;Ruth.39.11....................&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 03:04:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/100363#M28221</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-08-05T03:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Reading from Raw Data Files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/263745#M57749</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;SPAN&gt;cynthia,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;please explain the how pointer is reading the data. i am unable to comprehend the outcome. please help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 03:27:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-from-Raw-Data-Files/m-p/263745#M57749</guid>
      <dc:creator>Ashwani_singh</dc:creator>
      <dc:date>2016-04-14T03:27:41Z</dc:date>
    </item>
  </channel>
</rss>

