<?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: SAS Practice Test A00-211 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Practice-Test-A00-211/m-p/560877#M156925</link>
    <description>&lt;P&gt;Be aware that text posted into the main message windows may not actually reflect what you intended if you used a copy/paste.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="SAS Monospace" size="2"&gt;123&lt;/FONT&gt; &lt;FONT face="SAS Monospace" size="2"&gt;789&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#000000"&gt;   123   789 &lt;/FONT&gt; &lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif" size="3"&gt;The text was copied from the SAS Editor and pasted above. The first bit the leading blanks and 2 blanks between 3 and 7&amp;nbsp;were removed by the formum software. The second bit was pasted into a code box opened with the forum's {I} icon.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif" size="3"&gt;Why do I mention that? We cannot actually be sure that the data step we see was the actual data step that should be considered for answering questions. And you specific question answer would change drastically depending on the number and position of blanks.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif" size="3"&gt;Another obnoxious bit is that the data step code you pasted will not actually run.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;data test;
infile &lt;FONT color="#ff0000" size="5"&gt;‘&lt;/FONT&gt;employee&lt;STRONG&gt;&lt;FONT color="#ff0000" size="5"&gt;’&lt;/FONT&gt;&lt;/STRONG&gt;;
input employee_name $ 1-4;
if employee_name = &lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;‘&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;Ruth&lt;STRONG&gt;&lt;FONT color="#ff0000" size="5"&gt;’&lt;/FONT&gt;&lt;/STRONG&gt; then input idnum 10-11;
else input age 7-8;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif" size="3"&gt;&lt;FONT color="#000000"&gt;The quotes shown that are angled will generate errors such as:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;6    if employee_name = ‘Ruth’ then input idnum 10-11;
                        -
                        390
                        76
ERROR 390-185: Expecting an relational or arithmetic operator.

ERROR 76-322: Syntax error, statement will be ignored.
&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif" size="3"&gt;&lt;FONT color="#000000"&gt;because the characters the SAS compiler expects for quotes are either &lt;FONT size="5"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/FONT&gt; or &lt;FONT size="5"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 May 2019 15:16:36 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-05-22T15:16:36Z</dc:date>
    <item>
      <title>SAS Practice Test A00-211</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Practice-Test-A00-211/m-p/560718#M156869</link>
      <description>&lt;P&gt;How to solve the question below?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given the raw data file EMPLOYEE:&lt;BR /&gt;----I----1 0---I----20---I----30&lt;BR /&gt;Ruth 39 11&lt;BR /&gt;Jose 32 22&lt;BR /&gt;Sue 30 33&lt;BR /&gt;John 40 44&lt;BR /&gt;The following SAS program is submitted:&lt;BR /&gt;data test;&lt;BR /&gt;infile ‘employee’;&lt;BR /&gt;input employee_name $ 1-4;&lt;BR /&gt;if employee_name = ‘Ruth’ then input idnum 10-11;&lt;BR /&gt;else input age 7-8;&lt;BR /&gt;run;&lt;BR /&gt;What value does the variable IDNUM contain when the name of the employee is “Ruth”?&lt;BR /&gt;A. 11&lt;BR /&gt;B. 22&lt;BR /&gt;C. 33&lt;BR /&gt;D. (missing numeric value)&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 05:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Practice-Test-A00-211/m-p/560718#M156869</guid>
      <dc:creator>vincentgoh88</dc:creator>
      <dc:date>2019-05-22T05:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Practice Test A00-211</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Practice-Test-A00-211/m-p/560726#M156873</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/162015"&gt;@vincentgoh88&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;How to solve the question below?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;By executing the code an reading the created dataset.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 06:31:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Practice-Test-A00-211/m-p/560726#M156873</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-05-22T06:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Practice Test A00-211</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Practice-Test-A00-211/m-p/560727#M156874</link>
      <description>You are not required to read in every piece of data on each line.  SAS assumes that when the INPUT statement is finished, you have read in all the information you want from the current line of data.&lt;BR /&gt;&lt;BR /&gt;So SAS reads in "Ruth" from the first line of data, and the INPUT statement ends.  SAS assumes that you have read everything you need from line 1.  The next INPUT statement reads IDNUM from line 2, columns 10-11.</description>
      <pubDate>Wed, 22 May 2019 06:37:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Practice-Test-A00-211/m-p/560727#M156874</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-05-22T06:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Practice Test A00-211</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Practice-Test-A00-211/m-p/560877#M156925</link>
      <description>&lt;P&gt;Be aware that text posted into the main message windows may not actually reflect what you intended if you used a copy/paste.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="SAS Monospace" size="2"&gt;123&lt;/FONT&gt; &lt;FONT face="SAS Monospace" size="2"&gt;789&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#000000"&gt;   123   789 &lt;/FONT&gt; &lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif" size="3"&gt;The text was copied from the SAS Editor and pasted above. The first bit the leading blanks and 2 blanks between 3 and 7&amp;nbsp;were removed by the formum software. The second bit was pasted into a code box opened with the forum's {I} icon.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif" size="3"&gt;Why do I mention that? We cannot actually be sure that the data step we see was the actual data step that should be considered for answering questions. And you specific question answer would change drastically depending on the number and position of blanks.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif" size="3"&gt;Another obnoxious bit is that the data step code you pasted will not actually run.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;data test;
infile &lt;FONT color="#ff0000" size="5"&gt;‘&lt;/FONT&gt;employee&lt;STRONG&gt;&lt;FONT color="#ff0000" size="5"&gt;’&lt;/FONT&gt;&lt;/STRONG&gt;;
input employee_name $ 1-4;
if employee_name = &lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;‘&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;Ruth&lt;STRONG&gt;&lt;FONT color="#ff0000" size="5"&gt;’&lt;/FONT&gt;&lt;/STRONG&gt; then input idnum 10-11;
else input age 7-8;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif" size="3"&gt;&lt;FONT color="#000000"&gt;The quotes shown that are angled will generate errors such as:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;6    if employee_name = ‘Ruth’ then input idnum 10-11;
                        -
                        390
                        76
ERROR 390-185: Expecting an relational or arithmetic operator.

ERROR 76-322: Syntax error, statement will be ignored.
&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#008080" face="SAS Monospace" size="2"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif" size="3"&gt;&lt;FONT color="#000000"&gt;because the characters the SAS compiler expects for quotes are either &lt;FONT size="5"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/FONT&gt; or &lt;FONT size="5"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 15:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Practice-Test-A00-211/m-p/560877#M156925</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-22T15:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Practice Test A00-211</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Practice-Test-A00-211/m-p/561119#M157030</link>
      <description>&lt;P&gt;It should be 22.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 12:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Practice-Test-A00-211/m-p/561119#M157030</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-05-23T12:35:17Z</dc:date>
    </item>
  </channel>
</rss>

