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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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