<?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: Physical file does not exist (INLCUDE MACRO) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336041#M272423</link>
    <description>&lt;P&gt;Also watch out for blanks. Your macro variable might have embedded blanks (or other hidden characters).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put |&amp;amp;LABELMAC|;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or even the filename could have blanks or other strange characters. &amp;nbsp;This data step should find the names of every file in the folder that IN0 points to.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data names ;
  length fname filename $200;
  infile in0('*') filename=fname;
  input ;
  if fname ne lag(fname);
  filename = fname ;
  len = length(filename);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 26 Feb 2017 22:00:02 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2017-02-26T22:00:02Z</dc:date>
    <item>
      <title>Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336019#M272413</link>
      <description>&lt;P&gt;[Edit]&lt;/P&gt;&lt;P&gt;Sorry for the double post, but it appears that my edited questions stay in limbo for a while (I have one from last night that hasn't reappeared yet).&amp;nbsp; I made the mistake of editing a similar question to this and now its gone, so reposting as new question&lt;/P&gt;&lt;P&gt;[/Edit]&lt;/P&gt;&lt;P&gt;I'm trying to get the CMS HCC risk model to run in SAS Studio University Eddition and encountering some blockers.&amp;nbsp; One bit of code attempts to inlcude lines from a file called "V22H79L1.sas".&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%INCLUDE IN0(&amp;amp;LABELMAC)  /SOURCE2; %* hcc labels;&lt;/PRE&gt;&lt;P&gt;The file that contains the line above is a macro that defines the LABELMAC macro variable as an input argument,&lt;/P&gt;&lt;PRE&gt;%MACRO V2216O2M(INP=, IND=, OUTDATA=, IDVAR=, KEEPVAR=, SEDITS=,
                 DATE_ASOF=, DATE_ASOF_EDIT=,
                 FMNAME9=V22Y15RC, FMNAME0=V22Y16RC,
                 AGEFMT9=I9AGEY15MCE, SEXFMT9=I9SEXY15MCE,
                 AGEFMT0=I0AGEY16MCE, SEXFMT0=I0SEXY16MCE, DF=1,
                 LABELMAC=V22H79L1);&lt;/PRE&gt;&lt;P&gt;I have already defined IN0 such that it points to the directory containing the file "V22H79L1.sas" and I get the following error,&lt;/P&gt;&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 WARNING: Physical file does not exist, /folders/myfolders/sasuser.v94/cms_hcc_2017/V22H79L1.sas.
 ERROR: Cannot %INCLUDE member V22H79L1 in the aggregate IN0.
 61         
 62         %INCLUDE IN0(&amp;amp;LABELMAC)  /SOURCE2; %* hcc labels;
 63         
 64         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 77         &lt;/PRE&gt;&lt;P&gt;I get the same error if I define the macro variable just before the %INCLUDE statement,&lt;/P&gt;&lt;PRE&gt;%LET LABELMAC=V22H79L1;
%INCLUDE IN0(&amp;amp;LABELMAC)  /SOURCE2; %* hcc labels;&lt;/PRE&gt;&lt;P&gt;BUT, if I define the macro variable with quotes it finds the file to include,&lt;/P&gt;&lt;PRE&gt; 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62         %LET LABELMAC='V22H79L1.sas';
 63              %INCLUDE IN0(&amp;amp;LABELMAC)  /SOURCE2; %* hcc labels;
 NOTE: %INCLUDE (level 1) file IN0(V22H79L1.sas) is file /folders/myfolders/sasuser.v94/cms_hcc_2017/V22H79L1.sas.&lt;/PRE&gt;&lt;P&gt;So what's going on here?&amp;nbsp; The SAS code from CMS has all the macro variables defined w/o quotes and it'd take a while to go through and replace them all.&amp;nbsp; Am I doing something wrong in the initial case where LABELMAC is defined w/o quotes and w/o the "sas" extension?&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 21:01:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336019#M272413</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-02-26T21:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336022#M272414</link>
      <description>&lt;P&gt;Can't say for sure without seeing the macro and how it's used, but can't you just double quote the resulting macro variable(s)? e.g.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%LET LABELMAC=V22H79L1;
%INCLUDE IN0("&amp;amp;LABELMAC")  /SOURCE2; %* hcc labels;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 21:08:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336022#M272414</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-02-26T21:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336027#M272415</link>
      <description>&lt;P&gt;Thanks for the reply Art.&amp;nbsp; Adding the double quotes seems to prevent SAS from appending the extension ".sas",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62              %LET LABELMAC=V22H79L1;
 63              %INCLUDE IN0("&amp;amp;LABELMAC")  /SOURCE2; %* hcc labels;
 WARNING: Physical file does not exist, /folders/myfolders/sasuser.v94/cms_hcc_2017/V22H79L1.
 ERROR: Cannot %INCLUDE member V22H79L1 in the aggregate IN0.
 64         
 65         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 78         &lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Feb 2017 21:16:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336027#M272415</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-02-26T21:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336028#M272416</link>
      <description>&lt;P&gt;Again, just guessing, does this work?:&lt;/P&gt;
&lt;PRE&gt;%LET LABELMAC=V22H79L1;
%INCLUDE IN0("&amp;amp;LABELMAC..sas")  /SOURCE2; %* hcc labels;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 21:20:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336028#M272416</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-02-26T21:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336030#M272418</link>
      <description>&lt;P&gt;that does work, but (according to the error message) we shouldn't have to add the quotes right? It seems like SAS is performing some kind of search in the error below and appending the ".sas" characters to the LABELMAC variable and not finding the file that does exist.&amp;nbsp; I'm hoping for a solution that doesn't involve me editing all of the SAS code that uses this pattern &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62              %LET LABELMAC=V22H79L1;
 63              %INCLUDE IN0(&amp;amp;LABELMAC)  /SOURCE2; %* hcc labels;
 WARNING: Physical file does not exist, /folders/myfolders/sasuser.v94/cms_hcc_2017/V22H79L1.sas.
 ERROR: Cannot %INCLUDE member V22H79L1 in the aggregate IN0.
 64         
 65         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 78         &lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Feb 2017 21:31:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336030#M272418</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-02-26T21:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336032#M272419</link>
      <description>&lt;P&gt;The full code ...&lt;/P&gt;&lt;P&gt;Main program file&lt;/P&gt;&lt;PRE&gt; LIBNAME LIBRARY "/folders/myfolders/sasuser.v94/cms_hcc_2017";
 FILENAME IN0 "/folders/myfolders/sasuser.v94/cms_hcc_2017";
 LIBNAME  IN1 "/folders/myfolders/sasuser.v94/cms_hcc_2017/input";
 LIBNAME  IN2 "/folders/myfolders/sasuser.v94/cms_hcc_2017/input";
 LIBNAME  INCOEF "/folders/myfolders/sasuser.v94/cms_hcc_2017";
 LIBNAME  OUT "/folders/myfolders/sasuser.v94/cms_hcc_2017/output";

 %* include main macro;
 %INCLUDE IN0('V2216O2M.sas')/SOURCE2;

 %V2216O2M(INP      =IN1.PERSON,
           IND      =IN2.DIAG,
           OUTDATA  =OUT.PERSON,
           IDVAR    =HICNO,
           KEEPVAR  =HICNO &amp;amp;INPUTVARS &amp;amp;SCOREVARS &amp;amp;DEMVARS 
                     &amp;amp;HCCV22_list79 &amp;amp;CCV22_list79, 
           SEDITS   =1,
           DATE_ASOF="1FEB2016"D);&lt;/PRE&gt;&lt;P&gt;Main macro file&lt;/P&gt;&lt;PRE&gt; %MACRO V2216O2M(INP=, IND=, OUTDATA=, IDVAR=, KEEPVAR=, SEDITS=,
                 DATE_ASOF=, DATE_ASOF_EDIT=,
                 FMNAME9=V22Y15RC, FMNAME0=V22Y16RC,
                 AGEFMT9=I9AGEY15MCE, SEXFMT9=I9SEXY15MCE,
                 AGEFMT0=I0AGEY16MCE, SEXFMT0=I0SEXY16MCE, DF=1,
                 AGESEXMAC=AGESEXV2, EDITMAC9=V22I9ED1,
                 EDITMAC0=V22I0ED1, LABELMAC=V22H79L1,
                 HIERMAC=V22H79H1, SCOREMAC=SCOREVAR);


 %**********************************************************************
 * step1: include external macros
 **********************************************************************;
 %IF "&amp;amp;AGESEXMAC" ne "" %THEN %DO;
     %INCLUDE IN0(&amp;amp;AGESEXMAC) /SOURCE2; %* create demographic variables;
 %END;
 %IF "&amp;amp;EDITMAC9" ne "" %THEN %DO;
     %INCLUDE IN0(&amp;amp;EDITMAC9)   /SOURCE2; %* perform edits on ICD9;
 %END;
 %IF "&amp;amp;EDITMAC0" ne "" %THEN %DO;
     %INCLUDE IN0(&amp;amp;EDITMAC0)   /SOURCE2; %* perform edits on ICD10;
 %END;
 %IF "&amp;amp;LABELMAC" ne "" %THEN %DO;
     %INCLUDE IN0(&amp;amp;LABELMAC)  /SOURCE2; %* hcc labels;
 %END;
 %IF "&amp;amp;HIERMAC" ne "" %THEN %DO;
     %INCLUDE IN0(&amp;amp;HIERMAC)   /SOURCE2; %* hierarchies;
 %END;
 %IF "&amp;amp;SCOREMAC" ne "" %THEN %DO;
     %INCLUDE IN0(&amp;amp;SCOREMAC)  /SOURCE2; %* calculate score variable;
 %END;&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Feb 2017 21:40:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336032#M272419</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-02-26T21:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336034#M272420</link>
      <description>&lt;P&gt;Are you sure that you actually have that file in that directory?&lt;/P&gt;
&lt;P&gt;Is it possible that you created a file named&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;V22H79L1.SAS&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;instead?&lt;/P&gt;
&lt;P&gt;Unix filenames are case sensitive.&lt;/P&gt;
&lt;P&gt;Also watch out for files without the extension. In Unix a period is just a character so you could have a file named '&lt;SPAN&gt;V22H79L1' and a different file named 'V22H79L1.'.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 21:46:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336034#M272420</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-02-26T21:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336037#M272421</link>
      <description>&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7467i192B2E75D83DB397/image-size/original?v=1.0&amp;amp;px=-1" alt="sas_uni_version.png" title="sas_uni_version.png" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 21:52:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336037#M272421</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-02-26T21:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336039#M272422</link>
      <description>&lt;P&gt;the previous image looked pretty small on my screen, here's a zoom in.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7468i6B556BE5A9E4D913/image-size/original?v=1.0&amp;amp;px=-1" alt="sas_uni_closeup.png" title="sas_uni_closeup.png" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 21:55:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336039#M272422</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-02-26T21:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336041#M272423</link>
      <description>&lt;P&gt;Also watch out for blanks. Your macro variable might have embedded blanks (or other hidden characters).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put |&amp;amp;LABELMAC|;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or even the filename could have blanks or other strange characters. &amp;nbsp;This data step should find the names of every file in the folder that IN0 points to.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data names ;
  length fname filename $200;
  infile in0('*') filename=fname;
  input ;
  if fname ne lag(fname);
  filename = fname ;
  len = length(filename);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 22:00:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336041#M272423</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-02-26T22:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336042#M272424</link>
      <description />
      <pubDate>Sun, 26 Feb 2017 23:33:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336042#M272424</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-02-26T23:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336045#M272426</link>
      <description>&lt;P&gt;the trimmed version doesn't seem to help.&amp;nbsp; thanks for the code snippet to list the files in the directory.&amp;nbsp; it failed when it encountered directories in the directory it was searching, but I'm pretty sure the files are named correctly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62         %put |&amp;amp;LABELMAC|;
 |V22H79L1|
 63              %INCLUDE IN0(&amp;amp;LABELMAC)  /SOURCE2; %* hcc labels;
 WARNING: Physical file does not exist, /folders/myfolders/sasuser.v94/cms_hcc_2017/V22H79L1.sas.
 ERROR: Cannot %INCLUDE member V22H79L1 in the aggregate IN0.
 64         
 65         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 78         &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Feb 2017 22:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336045#M272426</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-02-26T22:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336049#M272427</link>
      <description>&lt;P&gt;Thanks for the input folks.&amp;nbsp; I think I'll just start putting the variables in quotes with the file extension as that it the only thing thats worked so far.&amp;nbsp; I'm attempting to port this to Python and just need a baseline to see if a small sample produces the same results.&amp;nbsp; Still curious as to why the warning prints the correct file name but then cant include it, but hey, that's life. Appreciate the help!&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 22:25:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336049#M272427</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-02-26T22:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336051#M272428</link>
      <description>&lt;P&gt;You need to make the whole filename be in lowercase, not just the .sas extension.&lt;/P&gt;
&lt;P&gt;Run this little test program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  length filename filepath $200;
  do filename='TESTFILE.sas','testfile.sas','TESTFILE.SAS';
    filepath = catx('/',pathname('work'),filename);
    file dummy filevar=filepath ;
     put '%PUT I am from ' filename 'file.;' ;
  end;
run;

filename test1 "%sysfunc(pathname(work))";
%include test1(testfile);
%INCLUDE TEST1(TESTFILE);
%include test1('testfile.sas');
%INCLUDE TEST1('TESTFILE.sas');
%INCLUDE TEST1('TESTFILE.SAS');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Same thing would apply to and data files that are porting from the IBM mainframe world. Only use '.dat' extension instead of '.sas' extension. So a program like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
   infile fileref(DEMOG);
   input id $ sex $ age ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;would look for a file named 'demog.dat' in the directory that FILEREF point to.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 22:52:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336051#M272428</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-02-26T22:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336053#M272429</link>
      <description>&lt;P&gt;ahhh ha!&amp;nbsp; that seems to have done the trick.&amp;nbsp; thank you sas ninja.&amp;nbsp; the comments at the tops of these files are a kind of fascinating look into the history of computing.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 22:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336053#M272429</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-02-26T22:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336057#M272430</link>
      <description>&lt;P&gt;I opened a ticket with SAS Support to let them know that the WARNING message was displaying the wrong physical filename.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 23:18:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/336057#M272430</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-02-26T23:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/438731#M272431</link>
      <description>&lt;P&gt;Any chance you could post your PERSON and DIAG files and where they go?&amp;nbsp; Also, do you just smash the run button the v2217o1p.sas file directly?&amp;nbsp; It looks like the call to the main macro supplies default parameter values.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%V2217O1M(INP      =IN1.PERSON,
           IND      =IN2.DIAG,
           OUTDATA  =OUT.PERSON,
           IDVAR    =HICNO,
           KEEPVAR  =HICNO &amp;amp;INPUTVARS &amp;amp;SCOREVARS &amp;amp;DEMVARS 
                     &amp;amp;HCCV22_list79 &amp;amp;CCV22_list79, 
           SEDITS   =1,
           DATE_ASOF="1FEB2018"D);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;This is my setup:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cms-risk-sas-screenshot.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18706iC8057B2F89BB54D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="cms-risk-sas-screenshot.JPG" alt="cms-risk-sas-screenshot.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cms-person-file.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18707iAD3553E2797EB254/image-size/large?v=v2&amp;amp;px=999" role="button" title="cms-person-file.JPG" alt="cms-person-file.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cms-diag-file.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18708i181E137E2A8D7168/image-size/large?v=v2&amp;amp;px=999" role="button" title="cms-diag-file.JPG" alt="cms-diag-file.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run it, I just get a bunch of "ERROR 180-322: Statement is not valid or it is used out of proper order." messages, and one "ERROR: File OUT.PERSON.DATA does not exist" message.&amp;nbsp; Do you have to make the output file yourself?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 17:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/438731#M272431</guid>
      <dc:creator>jreancsu</dc:creator>
      <dc:date>2018-02-20T17:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Physical file does not exist (INLCUDE MACRO)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/438782#M272432</link>
      <description>&lt;P&gt;I got the following working (omg finally):&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cms-working-inputs1.JPG" style="width: 293px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18717iDC917CD82A15DB0B/image-size/large?v=v2&amp;amp;px=999" role="button" title="cms-working-inputs1.JPG" alt="cms-working-inputs1.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cms-working-inputs2.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18718i65FC991F4224B0A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="cms-working-inputs2.JPG" alt="cms-working-inputs2.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cms-working-inputs3.JPG" style="width: 298px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18716i52E0B02224EAD5F8/image-size/large?v=v2&amp;amp;px=999" role="button" title="cms-working-inputs3.JPG" alt="cms-working-inputs3.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the lowercase column names matter.&lt;BR /&gt;There was also a random character at the bottom of the scorevar.sas file that had some messed up encoding.&lt;BR /&gt;&lt;BR /&gt;All-in-all, it was a pretty absurd amount of trial and error to get this thing working.&amp;nbsp; It'd be nice if CMS would put out a ready-to-run SAS program along with example input/output data.&amp;nbsp; Special shout-out to the National Bureau of Economic Research for putting this page together with examples: &lt;A href="http://www.nber.org/data/cms-risk-adjustment.html" target="_self"&gt;http://www.nber.org/data/cms-risk-adjustment.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 20:29:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Physical-file-does-not-exist-INLCUDE-MACRO/m-p/438782#M272432</guid>
      <dc:creator>jreancsu</dc:creator>
      <dc:date>2018-02-20T20:29:46Z</dc:date>
    </item>
  </channel>
</rss>

