<?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 Syntax Error Message When Using %LET to = a SAS File Member Name on SAS Enterprise Guide (EG) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951094#M371832</link>
    <description>&lt;P&gt;I am attempting to run the CCS Code to assess for ICD-9 diagnoses, running on SAS EG. However, I am getting an error code that I cannot seem to correct. I've tried to change the syntax of the '%LET CORE=' code to remove the double quotations, remove the ~, remove each '/', remove both '//', added the 'sas7bdat' extension, but I keep getting the syntax message.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attempted to simplify the path names. Does this code &amp;amp; log snip help? Any responses are appreciated as I've been trying to fix this for over a week.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CODE USED IN SAS ENTERPRISE GUIDE TO LOAD CCS DIAGNOSTIC TOOL:
FILENAME INRAW1 "~//…/CCS/ICD_9/ccs_multi_dx_tool_2015.csv" RECL=300;  
FILENAME INRAW2 "~//…/CCS/ICD_9/ccs_multi_pr_tool_2015.csv"	LRECL=300;
 
LIBNAME  IN1    "~//…/Example_Analysis/";  * Location of input discharge data;
LIBNAME  OUT1    "~//…OUT_Analysis";    * Location of output data;

TITLE1 'CREATE CCS MULTI-LEVEL TOOL CATEGORIES';
TITLE2 'USE WITH DISCHARGE ADMINISTRATIVE DATA THAT HAS DIAGNOSIS OR PROCECDURE CODES';

/******************************************************************/
/*  Macro Variables that must be set to define the characteristics*/
/*  of your SAS discharge data. Change these values to match the  */
/*  number of diagnoses and procedures on your dataset. Change    */
/*  CORE to match the name of your dataset.                       */
/******************************************************************/
* Maximum number of DXs on any record;   %LET DXS=6;
* Maximum number of PRs on any record;   %LET PRS=6;
* Input SAS file member name;            %LET CORE="~//…/EXAM_long";

LOG WITH ERROR:
NOTE: Line generated by the macro variable "CORE".
223         IN1."~//…EXAM_long”
            ____
            22
            201

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, CUROBS, END, INDSNAME, KEY, KEYRESET, KEYS, 
              NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.  

ERROR 201-322: The option is not recognized and will be ignored.

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Nov 2024 14:29:47 GMT</pubDate>
    <dc:creator>AJ17</dc:creator>
    <dc:date>2024-11-18T14:29:47Z</dc:date>
    <item>
      <title>Syntax Error Message When Using %LET to = a SAS File Member Name on SAS Enterprise Guide (EG)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951094#M371832</link>
      <description>&lt;P&gt;I am attempting to run the CCS Code to assess for ICD-9 diagnoses, running on SAS EG. However, I am getting an error code that I cannot seem to correct. I've tried to change the syntax of the '%LET CORE=' code to remove the double quotations, remove the ~, remove each '/', remove both '//', added the 'sas7bdat' extension, but I keep getting the syntax message.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attempted to simplify the path names. Does this code &amp;amp; log snip help? Any responses are appreciated as I've been trying to fix this for over a week.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CODE USED IN SAS ENTERPRISE GUIDE TO LOAD CCS DIAGNOSTIC TOOL:
FILENAME INRAW1 "~//…/CCS/ICD_9/ccs_multi_dx_tool_2015.csv" RECL=300;  
FILENAME INRAW2 "~//…/CCS/ICD_9/ccs_multi_pr_tool_2015.csv"	LRECL=300;
 
LIBNAME  IN1    "~//…/Example_Analysis/";  * Location of input discharge data;
LIBNAME  OUT1    "~//…OUT_Analysis";    * Location of output data;

TITLE1 'CREATE CCS MULTI-LEVEL TOOL CATEGORIES';
TITLE2 'USE WITH DISCHARGE ADMINISTRATIVE DATA THAT HAS DIAGNOSIS OR PROCECDURE CODES';

/******************************************************************/
/*  Macro Variables that must be set to define the characteristics*/
/*  of your SAS discharge data. Change these values to match the  */
/*  number of diagnoses and procedures on your dataset. Change    */
/*  CORE to match the name of your dataset.                       */
/******************************************************************/
* Maximum number of DXs on any record;   %LET DXS=6;
* Maximum number of PRs on any record;   %LET PRS=6;
* Input SAS file member name;            %LET CORE="~//…/EXAM_long";

LOG WITH ERROR:
NOTE: Line generated by the macro variable "CORE".
223         IN1."~//…EXAM_long”
            ____
            22
            201

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, CUROBS, END, INDSNAME, KEY, KEYRESET, KEYS, 
              NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.  

ERROR 201-322: The option is not recognized and will be ignored.

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 14:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951094#M371832</guid>
      <dc:creator>AJ17</dc:creator>
      <dc:date>2024-11-18T14:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error Message When Using %LET to = a SAS File Member Name on SAS Enterprise Guide (EG)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951095#M371833</link>
      <description>&lt;P&gt;Show us the code you are using.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, its always a good idea if you are using macros or macro variables to turn on the macro debugging options:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint symbolgen;&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;So execute the above command, run your code again, and show us the log again.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 14:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951095#M371833</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-11-18T14:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error Message When Using %LET to = a SAS File Member Name on SAS Enterprise Guide (EG)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951101#M371835</link>
      <description>&lt;P&gt;It was because the %LET CORE = statement had the path + file name, when it just required the file name. Thanks for all who responded!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 15:08:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951101#M371835</guid>
      <dc:creator>AJ17</dc:creator>
      <dc:date>2024-11-18T15:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error Message When Using %LET to = a SAS File Member Name on SAS Enterprise Guide (EG)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951102#M371836</link>
      <description>&lt;P&gt;Sure looks like your macro expects to be the name of a dataset in the library In1.&lt;/P&gt;
&lt;P&gt;"~//PATH/officerlong" looks to be the name of a FOLDER not a DATASET.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 15:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951102#M371836</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-11-18T15:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error Message When Using %LET to = a SAS File Member Name on SAS Enterprise Guide (EG)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951103#M371837</link>
      <description>&lt;P&gt;Without seeing the code&amp;nbsp; that defines the macro CORE, this is just a wild guess.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming you have an input dataset named Exam_long.sas7bdat in the directory&amp;nbsp;~//…/Example_Analysis/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could change the line:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Input SAS file member name;            %LET CORE="~//…/EXAM_long";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Input SAS file member name;            %LET CORE=EXAM_long;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But that's just a wild guess.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Personally, I think it's a bit dangerous for programmers to be asked to use macros, without being given an explanation of how the macro works, at least documenting the inputs and outputs.&amp;nbsp; I would recommend you review the macro definition, perhaps with the original macro programmer or another colleague, to understand how it works.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 15:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951103#M371837</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2024-11-18T15:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error Message When Using %LET to = a SAS File Member Name on SAS Enterprise Guide (EG)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951104#M371838</link>
      <description>&lt;P&gt;The DATA Step here is trying to load a SAS dataset:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA OUT1.NEW_MULTI_CCS (DROP = i);
    SET IN1.&amp;amp;CORE;
    ...
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;amp;CORE is defined as "~//PATH/officerlong", which is not a valid SAS dataset name. This looks like it is a path to a SAS dataset, which the library IN1 already is pointing to. You need to specify an unquoted SAS dataset name that is within the library IN1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, suppose your SAS dataset was called officerlong and it is within the IN1 library. You should make the following change to the program:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET CORE = officerlong;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 15:07:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Error-Message-When-Using-LET-to-a-SAS-File-Member-Name-on/m-p/951104#M371838</guid>
      <dc:creator>Stu_SAS</dc:creator>
      <dc:date>2024-11-18T15:07:50Z</dc:date>
    </item>
  </channel>
</rss>

