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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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