<?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 Can't find file path to include score code from VIYA folder location in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-t-find-file-path-to-include-score-code-from-VIYA-folder/m-p/675225#M203408</link>
    <description>&lt;P&gt;I have created a score code in Model Studio in SAS VIYA and saved it to&amp;nbsp;/My Folder/Test SAS score code.sas.&lt;/P&gt;&lt;P&gt;I want to score a dataset using this score code, from SAS studio in VIYA.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In our old 9.4 enviroment, the following code works (EDIT: I did not work afterall, I overlooked an error):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mycas.scored;
set mycas.to_score;
%include "E:\somepath\sascode.sas";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In Viya, I have tried the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mycas.scored;
set mycas.to_score;
%include "/My Folder/Test SAS score code.sas";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But I can't find a way to specify the file path, and get the following errors:&lt;/P&gt;&lt;DIV class="sasWarning"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WARNING: Physical file does not exist, /My Folder/Test SAS score code.sas.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ERROR: Cannot open %INCLUDE file /My Folder/Test SAS score code.sas.&lt;/DIV&gt;&lt;P&gt;Have tried finding some sort of path in enviroment manager with no luck. How are filepaths specified in VIYA so that the file can ble included? I tried copy pasting the contents of the scorecode file, but that does not work, neither on 9.4. or VIYA. The score code look something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; * This score code file references one or more analytic stores that are located in the caslib "Models".
 * This score code file references the following analytic-store tables:
 *   _123456789awrsadf_ast
 */&lt;BR /&gt;
data sasep.out;
   dcl package score ...;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Aug 2020 11:45:34 GMT</pubDate>
    <dc:creator>Ullsokk</dc:creator>
    <dc:date>2020-08-07T11:45:34Z</dc:date>
    <item>
      <title>Can't find file path to include score code from VIYA folder location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-find-file-path-to-include-score-code-from-VIYA-folder/m-p/675225#M203408</link>
      <description>&lt;P&gt;I have created a score code in Model Studio in SAS VIYA and saved it to&amp;nbsp;/My Folder/Test SAS score code.sas.&lt;/P&gt;&lt;P&gt;I want to score a dataset using this score code, from SAS studio in VIYA.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In our old 9.4 enviroment, the following code works (EDIT: I did not work afterall, I overlooked an error):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mycas.scored;
set mycas.to_score;
%include "E:\somepath\sascode.sas";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In Viya, I have tried the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mycas.scored;
set mycas.to_score;
%include "/My Folder/Test SAS score code.sas";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But I can't find a way to specify the file path, and get the following errors:&lt;/P&gt;&lt;DIV class="sasWarning"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WARNING: Physical file does not exist, /My Folder/Test SAS score code.sas.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ERROR: Cannot open %INCLUDE file /My Folder/Test SAS score code.sas.&lt;/DIV&gt;&lt;P&gt;Have tried finding some sort of path in enviroment manager with no luck. How are filepaths specified in VIYA so that the file can ble included? I tried copy pasting the contents of the scorecode file, but that does not work, neither on 9.4. or VIYA. The score code look something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; * This score code file references one or more analytic stores that are located in the caslib "Models".
 * This score code file references the following analytic-store tables:
 *   _123456789awrsadf_ast
 */&lt;BR /&gt;
data sasep.out;
   dcl package score ...;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 11:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-find-file-path-to-include-score-code-from-VIYA-folder/m-p/675225#M203408</guid>
      <dc:creator>Ullsokk</dc:creator>
      <dc:date>2020-08-07T11:45:34Z</dc:date>
    </item>
  </channel>
</rss>

