<?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 Prep Guide SAS 9 4th edition question on Ch 2 quiz in SAS Certification</title>
    <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504334#M486</link>
    <description>Hi:&lt;BR /&gt;Well, I would have liked it if the option had been named:&lt;BR /&gt;VALIDVARNAME_WHEN_USED_AS_NAME_LITERAL&lt;BR /&gt;or made it:&lt;BR /&gt;VALIDVARNAME=ANY_AS_NAME_LITERAL -- but they didn't ask me for input into the option name.&lt;BR /&gt;Sigh.&lt;BR /&gt;Cynthia</description>
    <pubDate>Mon, 15 Oct 2018 14:31:36 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2018-10-15T14:31:36Z</dc:date>
    <item>
      <title>SAS Prep Guide SAS 9 4th edition question on Ch 2 quiz</title>
      <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504031#M477</link>
      <description>&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;This is question 5 from Chapter 2 SAS Certification Prep Guide, edition 2018&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN style="font-weight: 400;"&gt;5. With the system option VALIDVARNAME=ANY, which of the following variable names is valid?&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;a 4BirthDate&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;b $Cost&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;c _Items_&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;d Tax-Rate&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;e All of the above&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;My answer is e.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;Answer from the book&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN style="font-weight: 400;"&gt;Correct answer: c&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;Variable names follow the same rules as SAS data set names. They can be 1 to 32 characters long, must begin with a letter (A-Z, either uppercase or lowercase) or an underscore, and can continue with any combination of numbers, letters, or underscores.&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;It seems that in the explanation missed VALIDVARNAME option, which is set to ANY. That means that there are no SAS rules to apply for variables names. Can you clarify the correct answer?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Oct 2018 17:59:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504031#M477</guid>
      <dc:creator>trapinka</dc:creator>
      <dc:date>2018-10-13T17:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Prep Guide SAS 9 4th edition question on Ch 2 quiz</title>
      <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504038#M478</link>
      <description>&lt;P&gt;I would say that C is technically correct since the others would require the use of a name literal and not the value as shown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  length 4BirthDate $Cost _Items_ Tax-Rate 8 ;
run;
data test;
  length '4BirthDate'n '$Cost'n _Items_ 'Tax-Rate'n 8 ;
run;
proc contents data=test;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But that is one poorly worded question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;E could reasonable be seen as the correct&amp;nbsp;answer since this is what PROC CONTENTS shows.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 289px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23992i605F77EE999050A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;A better question would include at least one value using a name literal to make it clearer what the list represented. Or a value that is illegal even using VALIDVARNAME=ANY, such as one that is all blanks or includes a null byte ('00'x).&amp;nbsp; Then&amp;nbsp;which answer was correct would NOT depend on how the user interpreted the meaning of the list.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Oct 2018 20:25:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504038#M478</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-10-13T20:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Prep Guide SAS 9 4th edition question on Ch 2 quiz</title>
      <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504053#M479</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; This is addressed in the errata or content update for the 4th edition, as shown here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/en/books/content-updates-base-prep-guide-4th-edition.html" target="_blank"&gt;https://support.sas.com/en/books/content-updates-base-prep-guide-4th-edition.html&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Look for Appendix 1 update. page 528, question 5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 13 Oct 2018 22:22:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504053#M479</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-10-13T22:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Prep Guide SAS 9 4th edition question on Ch 2 quiz</title>
      <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504102#M480</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; This is addressed in the errata or content update for the 4th edition, as shown here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/en/books/content-updates-base-prep-guide-4th-edition.html" target="_blank"&gt;https://support.sas.com/en/books/content-updates-base-prep-guide-4th-edition.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Look for Appendix 1 update. page 528, question 5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That correction does NOT actually fix the problems with the question. It just changes the answer to one that assumes the list of names it like what you would see in PROC CONTENTS output instead of what you would use in SAS code.&amp;nbsp; The question is left uncorrected.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Oct 2018 16:14:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504102#M480</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-10-14T16:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Prep Guide SAS 9 4th edition question on Ch 2 quiz</title>
      <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504120#M481</link>
      <description>Tom:&lt;BR /&gt;  Thanks for the feedback. I'll ask the Certification editors to take a look at the specific question.&lt;BR /&gt;Cynthia</description>
      <pubDate>Sun, 14 Oct 2018 18:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504120#M481</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-10-14T18:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Prep Guide SAS 9 4th edition question on Ch 2 quiz</title>
      <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504305#M482</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;, thank you for your feedback. We can look into updating this question for our next release.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, the question is asking when you use VALIDVARNAME=ANY which of&amp;nbsp;names are valid. Yes, you can do it with name literal,&amp;nbsp;but you must also declare&lt;/P&gt;
&lt;PRE&gt;options validvarname=any&lt;/PRE&gt;
&lt;P&gt;for it to work. &lt;STRONG&gt;This may be dependent upon which SAS environment you are using&lt;/STRONG&gt;. For Windowing Environment, the default is set to VALIDVARNAME=V7.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do not set VALIDVARNAME=ANY in the OPTIONS statement then the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
	length 4BirthDate $Cost _Items_ Tax-Rate 8;
run;
proc contents data=test;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;results in an error in the log that, 4BirthDate is not a valid SAS name.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, in order for it to work you must declare options VALIDVARNAME=ANY and use name literal like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=any;
data test01;
   length '4BirthDate'n '$Cost'n '_Items_'n 'Tax-Rate'n 8;
run;
proc contents data=test01;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried the same thing in SAS Studio and without the&lt;/P&gt;
&lt;PRE&gt;options validvarname=any&lt;/PRE&gt;
&lt;P&gt;and it gave me the same error and then I did it with the options statement and declaring a name literal, and then I got the correct answer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Base SAS is shipped with the system options being set to VALIDVARNAME=V7 and SAS Viya is shipped with the system options being set to VALIDVARNAME=ANY.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a link to the documentation for more information:&amp;nbsp;&lt;A title="VALIDVARNAME=ANY System Option" href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lesysoptsref&amp;amp;docsetTarget=p124dqdk8zoqu3n1r4nsfqu5vx52.htm" target="_blank"&gt;VALIDVARNAME=ANY System Option&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps and clarifies a bit more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Samantha&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 13:58:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504305#M482</guid>
      <dc:creator>sabisw</dc:creator>
      <dc:date>2018-10-15T13:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Prep Guide SAS 9 4th edition question on Ch 2 quiz</title>
      <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504327#M483</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/73569"&gt;@sabisw&lt;/a&gt;&amp;nbsp;for your reply. And for proving my point.&lt;/P&gt;
&lt;P&gt;The issue with the question is not really whether the names are valid, but whether the question is clear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The names as listed in the question might be valid names, but they are not valid names for use in actual SAS code.&lt;/P&gt;
&lt;P&gt;So whether C or E is the right answer depends on how the user interprets the question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore the question needs to be fixed to eliminate that ambiguity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;2    options validvarname=any;
3    data test;
4    	length 4BirthDate $Cost _Items_ Tax-Rate 8;
             -
             22
ERROR 22-322: Syntax error, expecting one of the following: a name, _ALL_, _CHARACTER_, _CHAR_,
              _NUMERIC_.

4  ! 	length 4BirthDate $Cost _Items_ Tax-Rate 8;
                           ----
                           22
ERROR: Alphabetic prefixes for enumerated variables (Tax-Rate) are different.
ERROR 22-322: Expecting a numeric constant.

5    run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEST may be incomplete.  When this step was stopped there were 0
         observations and 3 variables.&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:29:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504327#M483</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-10-15T14:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Prep Guide SAS 9 4th edition question on Ch 2 quiz</title>
      <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504328#M484</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;, Correct they are not valid SAS names therefore you have to use VALIDVARNAME=ANY and declare them as a name literal. That's the reason why without the VALIDVARNAME=ANY it doesn't work.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504328#M484</guid>
      <dc:creator>sabisw</dc:creator>
      <dc:date>2018-10-15T14:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Prep Guide SAS 9 4th edition question on Ch 2 quiz</title>
      <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504333#M485</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/73569"&gt;@sabisw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;, Correct they are not valid SAS names therefore you have to use VALIDVARNAME=ANY and declare them as a name literal. That's the reason why without the VALIDVARNAME=ANY it doesn't work.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Great, so you will have someone re-word the question to remove the ambiguity?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504333#M485</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-10-15T14:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Prep Guide SAS 9 4th edition question on Ch 2 quiz</title>
      <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504334#M486</link>
      <description>Hi:&lt;BR /&gt;Well, I would have liked it if the option had been named:&lt;BR /&gt;VALIDVARNAME_WHEN_USED_AS_NAME_LITERAL&lt;BR /&gt;or made it:&lt;BR /&gt;VALIDVARNAME=ANY_AS_NAME_LITERAL -- but they didn't ask me for input into the option name.&lt;BR /&gt;Sigh.&lt;BR /&gt;Cynthia</description>
      <pubDate>Mon, 15 Oct 2018 14:31:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504334#M486</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-10-15T14:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Prep Guide SAS 9 4th edition question on Ch 2 quiz</title>
      <link>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504339#M487</link>
      <description>&lt;P&gt;The fact that name literals are required is part of what makes the question poor. It basically is penalizing test takers that understand SAS too well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:36:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/SAS-Prep-Guide-SAS-9-4th-edition-question-on-Ch-2-quiz/m-p/504339#M487</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-10-15T14:36:55Z</dc:date>
    </item>
  </channel>
</rss>

