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 ...;

 

  

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 757 views
  • 0 likes
  • 1 in conversation