BookmarkSubscribeRSS Feed
Ullsokk
Pyrite | Level 9

I have created a score code in Model Studio in SAS VIYA and saved it to /My Folder/Test SAS score code.sas.

I want to score a dataset using this score code, from SAS studio in VIYA. 

In our old 9.4 enviroment, the following code works (EDIT: I did not work afterall, I overlooked an error):

data mycas.scored;
set mycas.to_score;
%include "E:\somepath\sascode.sas";
run;

In Viya, I have tried the following:

data mycas.scored;
set mycas.to_score;
%include "/My Folder/Test SAS score code.sas";
run;

But I can't find a way to specify the file path, and get the following errors:

     WARNING: Physical file does not exist, /My Folder/Test SAS score code.sas.
     ERROR: Cannot open %INCLUDE file /My Folder/Test SAS score code.sas.

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:

 * 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
 */
data sasep.out; dcl package score ...;

 

  

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 807 views
  • 0 likes
  • 1 in conversation