<?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 Quick Answer Hopefully: Where is the syntax error? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241897#M44855</link>
    <description>&lt;P&gt;Hello, it would be much appreciated, if somone could point out the syntax error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The contents of the raw data file CALENDAR are listed below:&lt;BR /&gt;--------10-------20-------30&lt;BR /&gt;01012000&lt;BR /&gt;The following SAS program is submitted:&lt;BR /&gt;data test;&lt;BR /&gt;infile 'calendar';&lt;BR /&gt;input @1 date mmddyy10.;&lt;BR /&gt;if date = '01012000'd then event = 'January 1st';&lt;BR /&gt;run;&lt;BR /&gt;Which one of the following is the value of the EVENT variable?&lt;/P&gt;&lt;P&gt;A. The value can not be determined as the program fails to execute due to errors&lt;BR /&gt;B. . (missing numeric value)&lt;BR /&gt;C. January 1st&lt;BR /&gt;D. 01012000&lt;/P&gt;&lt;P&gt;Answer: A.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2016 19:54:44 GMT</pubDate>
    <dc:creator>Durlov</dc:creator>
    <dc:date>2016-01-05T19:54:44Z</dc:date>
    <item>
      <title>Quick Answer Hopefully: Where is the syntax error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241897#M44855</link>
      <description>&lt;P&gt;Hello, it would be much appreciated, if somone could point out the syntax error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The contents of the raw data file CALENDAR are listed below:&lt;BR /&gt;--------10-------20-------30&lt;BR /&gt;01012000&lt;BR /&gt;The following SAS program is submitted:&lt;BR /&gt;data test;&lt;BR /&gt;infile 'calendar';&lt;BR /&gt;input @1 date mmddyy10.;&lt;BR /&gt;if date = '01012000'd then event = 'January 1st';&lt;BR /&gt;run;&lt;BR /&gt;Which one of the following is the value of the EVENT variable?&lt;/P&gt;&lt;P&gt;A. The value can not be determined as the program fails to execute due to errors&lt;BR /&gt;B. . (missing numeric value)&lt;BR /&gt;C. January 1st&lt;BR /&gt;D. 01012000&lt;/P&gt;&lt;P&gt;Answer: A.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 19:54:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241897#M44855</guid>
      <dc:creator>Durlov</dc:creator>
      <dc:date>2016-01-05T19:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Quick Answer Hopefully: Where is the syntax error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241901#M44856</link>
      <description>&lt;P&gt;Date literals are in the form of "10Jan2016"d. The case is optional and quotes may be single or double&amp;nbsp;but the month must be the 3 letter abbreviation and either the last 2 digits of year or the 4 digit version.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 20:10:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241901#M44856</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-05T20:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Quick Answer Hopefully: Where is the syntax error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241914#M44863</link>
      <description>Did you try running the code? The log should help you out here. &lt;BR /&gt;&lt;BR /&gt;1152  data test;&lt;BR /&gt;1153  infile 'calendar';&lt;BR /&gt;1154  input @1 date mmddyy10.;&lt;BR /&gt;1155  if date = '01012000'd then event = 'January 1st';&lt;BR /&gt;                -----------&lt;BR /&gt;                77&lt;BR /&gt;ERROR: Invalid date/time/datetime constant '01012000'd.&lt;BR /&gt;ERROR 77-185: Invalid number conversion on '01012000'd.&lt;BR /&gt;&lt;BR /&gt;1156  cards;&lt;BR /&gt;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.TEST may be incomplete.  When this step was stopped there were 0&lt;BR /&gt;         observations and 2 variables.&lt;BR /&gt;WARNING: Data set WORK.TEST was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;      real time           0.09 seconds&lt;BR /&gt;      cpu time            0.00 seconds&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Jan 2016 20:57:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241914#M44863</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-05T20:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Quick Answer Hopefully: Where is the syntax error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241920#M44869</link>
      <description>Hey Reeza, I have limited access to the SAS program, so I usually can't run the codes. I do research questions on Google before posting them. However, this one had no explanations and posting it is my way of contributing a discussion on the question, so that future SAS users can find it.</description>
      <pubDate>Tue, 05 Jan 2016 21:21:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241920#M44869</guid>
      <dc:creator>Durlov</dc:creator>
      <dc:date>2016-01-05T21:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Quick Answer Hopefully: Where is the syntax error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241921#M44870</link>
      <description>&lt;P&gt;Hey ballardw, are you saying SAS can only read "JAN", "FEB", ... as the month from raw data files? I must have missed that during my studying, but that sounds a bit troublesome. So SAS would not be able to read a raw data file that contains 01012000 or 01/01/2000 or 31/12/200 or JAN122000? That would be interesting to note.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 21:28:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241921#M44870</guid>
      <dc:creator>Durlov</dc:creator>
      <dc:date>2016-01-05T21:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Quick Answer Hopefully: Where is the syntax error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241922#M44871</link>
      <description>You can use SAS University Edition for learning purposes, even if you're not a student. It's free, as well as the first SAS course.  Run at home or via AWS.&lt;BR /&gt;&lt;BR /&gt;And that's not what &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; is saying. He's specifying that in code to let SAS know you're referring to a date you specify if it in a specific format.  This is a good idea since it means all date literals in code have the same format, consistency is good &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; SAS can read in many different date formats and compare them as long as they're in a SAS date format. It's worth reading some papers on how SAS stores dates. I recommend searching lexjansen.com for papers that people have written.  &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Jan 2016 21:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241922#M44871</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-05T21:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Quick Answer Hopefully: Where is the syntax error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241923#M44872</link>
      <description>&lt;P&gt;Wait hold on. I think I see the error. By Date literal, you the "01012000"d part. Not the info in the raw data file. Thanks much. That helps!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 21:36:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241923#M44872</guid>
      <dc:creator>Durlov</dc:creator>
      <dc:date>2016-01-05T21:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Quick Answer Hopefully: Where is the syntax error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241924#M44873</link>
      <description>&lt;P&gt;Link to SAS Analytics U&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sas.com/en_us/learn/analytics-u.html" target="_blank"&gt;http://www.sas.com/en_us/learn/analytics-u.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 21:37:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241924#M44873</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-05T21:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Quick Answer Hopefully: Where is the syntax error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241925#M44874</link>
      <description>&lt;P&gt;Yeah, I have SAS Uni. But I can't access it at work... strict downloading restrictions. Anyways, thanks for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 21:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quick-Answer-Hopefully-Where-is-the-syntax-error/m-p/241925#M44874</guid>
      <dc:creator>Durlov</dc:creator>
      <dc:date>2016-01-05T21:38:28Z</dc:date>
    </item>
  </channel>
</rss>

