<?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: Error Messages in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312668#M67842</link>
    <description>&lt;P&gt;Can you post the original code as is, there appear to be various parts missing in that snippet - create table or view, from etc.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Nov 2016 16:24:52 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-11-18T16:24:52Z</dc:date>
    <item>
      <title>Error Messages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312663#M67837</link>
      <description>&lt;P&gt;I have tried a few things to no eval, please help fix....ugh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;37 PROC SQL NOEXEC;&lt;/P&gt;&lt;P&gt;38&lt;/P&gt;&lt;P&gt;39 SELECT BD.BIDDER_ORGANIZATION_NAME, BD.VIN, BD.YEAR, BD.MAKE, BD.MODEL, BD.MILEAGE, BD.BUY_PRICE, BD.BID_AMOUNT,&lt;/P&gt;&lt;P&gt;39 ! S.Sale_Price AS Purchase Price Cognos,&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;_____&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;79&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;ERROR 79-322: Expecting a FROM.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;40 BD.BID_DATE, BD.BID_SITE, BD.BIDDER_DEALER_CODE, BD.BIDDER_STATE, BD.BIDDER_ZIP, BD.INTERATION_SOLD,&lt;/P&gt;&lt;P&gt;40 ! BD.SOLD_WEBSITE, BD.SALE_DATE,&lt;/P&gt;&lt;P&gt;41 YEAR(BD.BID_DATE) AS BID YEAR, MONTH(BD.BID_DATE) AS BID MONTH, S.Company, S.Dlr_GMF_ID AS Sold Dealer Code&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;____&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;2 The SAS System 08:29 Friday, November 18, 2016&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;76&lt;/P&gt;&lt;P&gt;41 ! Cognos,&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;ERROR 22-322: Syntax error, expecting one of the following: ',', GROUP, ORDER.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 16:18:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312663#M67837</guid>
      <dc:creator>TMiller16</dc:creator>
      <dc:date>2016-11-18T16:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error Messages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312668#M67842</link>
      <description>&lt;P&gt;Can you post the original code as is, there appear to be various parts missing in that snippet - create table or view, from etc.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 16:24:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312668#M67842</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-18T16:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error Messages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312670#M67843</link>
      <description>37 PROC SQL NOEXEC;&lt;BR /&gt;&lt;BR /&gt;38&lt;BR /&gt;39 SELECT BD.BIDDER_ORGANIZATION_NAME, BD.VIN, BD.YEAR, BD.MAKE, BD.MODEL, BD.MILEAGE, BD.BUY_PRICE, BD.BID_AMOUNT,&lt;BR /&gt;39 ! S.Sale_Price AS 'Purchase Price Cognos',&lt;BR /&gt;_______________________&lt;BR /&gt;22&lt;BR /&gt;ERROR 22-322: Expecting a name.&lt;BR /&gt;&lt;BR /&gt;40 BD.BID_DATE, BD.BID_SITE, BD.BIDDER_DEALER_CODE, BD.BIDDER_STATE, BD.BIDDER_ZIP, BD.INTERATION_SOLD,&lt;BR /&gt;40 ! BD.SOLD_WEBSITE, BD.SALE_DATE,&lt;BR /&gt;41 YEAR(BD.BID_DATE) AS 'BID YEAR', MONTH(BD.BID_DATE) AS 'BID MONTH', S.Company, S.Dlr_GMF_ID AS 'Sold Dealer&lt;BR /&gt;__________ ___________&lt;BR /&gt;2 The SAS System 08:29 Friday, November 18, 2016&lt;BR /&gt;&lt;BR /&gt;_________________________&lt;BR /&gt;22 22 22&lt;BR /&gt;41 ! Code Cognos',&lt;BR /&gt;ERROR 22-322: Expecting a name.&lt;BR /&gt;&lt;BR /&gt;42&lt;BR /&gt;43 (CASE WHEN BD.BIDDER_DEALER_CODE = S.Dlr_GMF_ID&lt;BR /&gt;44 THEN 'WON'&lt;BR /&gt;45 ELSE 'LOST' END) AS 'WON LOSS',&lt;BR /&gt;__________&lt;BR /&gt;22&lt;BR /&gt;ERROR 22-322: Expecting a name.&lt;BR /&gt;&lt;BR /&gt;46&lt;BR /&gt;47 FROM BidData DB&lt;BR /&gt;_______&lt;BR /&gt;79&lt;BR /&gt;ERROR 79-322: Expecting a FROM.&lt;BR /&gt;&lt;BR /&gt;48 INNER JOIN Sales S ON (DB.VIN = S.VIN)&lt;BR /&gt;49 AND (BD.BIDDER_DEALER_CODE = S.Dlr_GMF_ID),&lt;BR /&gt;50 INNER JOIN Active_Dealers AD ON (S.Dlr.GMF.ID = AD.Dlr.GMF.ID)&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;76&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, ), *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN,&lt;BR /&gt;CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.&lt;BR /&gt;&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;51&lt;BR /&gt;52 WHERE AD.RSS_Flag = '1'&lt;BR /&gt;53&lt;BR /&gt;54 GROUP BY BD.VIN;&lt;BR /&gt;55&lt;BR /&gt;56 RUN;&lt;BR /&gt;NOTE: PROC SQL statements are executed immediately; The RUN statement has no effect.&lt;BR /&gt;57&lt;BR /&gt;58 QUIT;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds</description>
      <pubDate>Fri, 18 Nov 2016 16:28:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312670#M67843</guid>
      <dc:creator>TMiller16</dc:creator>
      <dc:date>2016-11-18T16:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error Messages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312672#M67844</link>
      <description>&lt;P&gt;No, I meant post the original code, not the log. &amp;nbsp;However I do note that at a couple of places you have:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;S.Sale_Price AS 'Purchase Price Cognos',&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In SAS you don't do this, you may be able to put n&amp;nbsp;after the text string and get it to work (not tested):&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;S.Sale_Price AS 'Purchase Price Cognos'n,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;However I would really advise not to. &amp;nbsp;If you doing this in SAS, use the terminology which is correct across ANSI SQL:&lt;BR /&gt;S.Sale_Price AS PURCHASE_PRICE_COGNOS,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Ie. a variable name.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 16:36:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312672#M67844</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-18T16:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error Messages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312674#M67845</link>
      <description>Here you go, sorry misunderstood what you were looking for,&lt;BR /&gt;&lt;BR /&gt;PROC IMPORT TABLE="Sales" OUT=SASUSER.Sales&lt;BR /&gt;DBMS=access&lt;BR /&gt;REPLACE;&lt;BR /&gt;DATABASE="\\americredit.com\db_files\AOC\SA\AR\Analytics\RDW.accdb";&lt;BR /&gt;&lt;BR /&gt;PROC IMPORT TABLE="Active_Dealers" OUT=SASUSER.Active_Dealers&lt;BR /&gt;DBMS=access&lt;BR /&gt;REPLACE;&lt;BR /&gt;DATABASE="\\americredit.com\db_files\AOC\SA\AR\Analytics\RDW.accdb";&lt;BR /&gt;&lt;BR /&gt;PROC IMPORT DATAFILE="X:\Analytics\Reports\Sources" OUT=SASUSER.BidData&lt;BR /&gt;DBMS=xlsx&lt;BR /&gt;REPLACE;&lt;BR /&gt;SHEET="BidData";&lt;BR /&gt;GETNAMES=yes;&lt;BR /&gt;&lt;BR /&gt;PROC SQL NOEXEC;&lt;BR /&gt;&lt;BR /&gt;SELECT BD.BIDDER_ORGANIZATION_NAME, BD.VIN, BD.YEAR, BD.MAKE, BD.MODEL, BD.MILEAGE, BD.BUY_PRICE, BD.BID_AMOUNT, S.Sale_Price AS 'Purchase Price Cognos',&lt;BR /&gt;BD.BID_DATE, BD.BID_SITE, BD.BIDDER_DEALER_CODE, BD.BIDDER_STATE, BD.BIDDER_ZIP, BD.INTERATION_SOLD, BD.SOLD_WEBSITE, BD.SALE_DATE,&lt;BR /&gt;YEAR(BD.BID_DATE) AS 'BID YEAR', MONTH(BD.BID_DATE) AS 'BID MONTH', S.Company, S.Dlr_GMF_ID AS 'Sold Dealer Code Cognos',&lt;BR /&gt;&lt;BR /&gt;(CASE WHEN BD.BIDDER_DEALER_CODE = S.Dlr_GMF_ID&lt;BR /&gt;THEN 'WON'&lt;BR /&gt;ELSE 'LOST' END) AS 'WON LOSS',&lt;BR /&gt;&lt;BR /&gt;FROM BidData DB&lt;BR /&gt;INNER JOIN Sales S ON (DB.VIN = S.VIN)&lt;BR /&gt;AND (BD.BIDDER_DEALER_CODE = S.Dlr_GMF_ID),&lt;BR /&gt;INNER JOIN Active_Dealers AD ON (S.Dlr.GMF.ID = AD.Dlr.GMF.ID)&lt;BR /&gt;&lt;BR /&gt;WHERE AD.RSS_Flag = '1'&lt;BR /&gt;&lt;BR /&gt;GROUP BY BD.VIN;&lt;BR /&gt;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;QUIT;</description>
      <pubDate>Fri, 18 Nov 2016 16:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312674#M67845</guid>
      <dc:creator>TMiller16</dc:creator>
      <dc:date>2016-11-18T16:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error Messages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312677#M67848</link>
      <description>&lt;P&gt;I would definately start by changing those with the quoted text for variables:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;S.Dlr_GMF_ID AS 'Sold Dealer Code Cognos',&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;S.Dlr_GMF_ID AS Sold_Dealer_Code_Cognos,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would also advise some code formatting there (consitent casing, indentation, finisihing steps e.g with run;) as its quite difficult to read that for example - using the {i} above the post:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;proc import table="sales" out=sasuser.sales
  dbms=access
  replace;
  database="\\americredit.com\db_files\aoc\sa\ar\analytics\rdw.accdb";
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To add, what you have there is Named Literals - but you are missing the "n" to indicate that they are so. &amp;nbsp;You will find information on them here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/viewer.htm#p18cdcs4v5wd2dn1q0x296d3qek6.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/viewer.htm#p18cdcs4v5wd2dn1q0x296d3qek6.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I would still suggest avoiding the use of them however, there doesn't seem to be any need in the code you give.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 16:51:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312677#M67848</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-18T16:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error Messages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312685#M67849</link>
      <description>&lt;P&gt;Just use&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/viewer.htm#p18cdcs4v5wd2dn1q0x296d3qek6.htm" target="_blank"&gt;valid variable names&lt;/A&gt;, and your problems will be gone.&lt;/P&gt;
&lt;P&gt;'WIN LOSS' is&amp;nbsp;&lt;U&gt;not&lt;/U&gt; a valid SAS name, for instance.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 17:12:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312685#M67849</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-11-18T17:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error Messages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312686#M67850</link>
      <description>You can use label:&lt;BR /&gt;Eg: S.Sale_Price AS 'Purchase Price Cognos' &lt;BR /&gt;to S.Sale_Price AS P_Price_Cognos label = 'Purchase Price Cognos'&lt;BR /&gt;etc&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Nov 2016 17:27:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Messages/m-p/312686#M67850</guid>
      <dc:creator>dntran16</dc:creator>
      <dc:date>2016-11-18T17:27:12Z</dc:date>
    </item>
  </channel>
</rss>

