BookmarkSubscribeRSS Feed
pathfinder1_1
Calcite | Level 5

Hi, I am reading an MPS file using this code. I got this code from this link. https://documentation.sas.com/?docsetId=casactmopt&docsetTarget=casactmopt_optimization_examples06.h...

 

proc cas;
example_fix_string = readpath ("&filepath."); 
loadactionset "optimization";
action optimization.loadMps /
mpsFileString = example_fix_string
casOut = {name = "example_fix" replace = true}
format = "FIXED";
run;
action table.fetch / table = "example_fix" to = 24;
run;
quit;

 

However, I get this error as shown in below error log. I wonder how to fix?

 

30 proc cas;
31 example_fix_string = readpath ("&filepath."); 
32 loadactionset "optimization";
33 action optimization.loadMps /
34 mpsFileString = example_fix_string
35 casOut = {name = "example_fix" replace = true}
36 format = "FIXED";
37 run;
ERROR: The server connection has not been specified
ERROR: Execution halted
38 action table.fetch / table = "example_fix" to = 24;
39 run;
ERROR: There is no server connection to execute the action 'table.fetch'.
ERROR: Execution halted
40 quit;

1 REPLY 1
RobPratt
SAS Super FREQ

I suspect that you have SAS/OR (SAS 9) and not SAS Optimization (SAS Viya).  If that is true, please try this example instead:

https://go.documentation.sas.com/?docsetId=ormpug&docsetTarget=ormpug_mpsds_sect024.htm&docsetVersio...

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 367 views
  • 0 likes
  • 2 in conversation