BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RobPratt
SAS Super FREQ

Yes, if you want the same text value for every observation, you can just do this:

create data mydata from [p t c d] ContainersfromPortstoLSPtoDC InboundLinehaul Trial="Best5CustomerScenario";

You can also specify a string array that depends on any combination of p, t, c, or d.  For example:

 

str mytrial {Ports, LSP};
...
create data mydata from [p t c d] ContainersfromPortstoLSPtoDC InboundLinehaul Trial=mytrial[p,c];

 

Santha
Pyrite | Level 9

Perfect. Thank you

Santha
Pyrite | Level 9

For my next scenario, I want to store my numbers (my field names are same as previous one). Instead of create data, can i just append the current scenario results to the previous scenario results that are contained in mydata?

If not i can create a new table name, and then consolidate them together. Suggestions?

RobPratt
SAS Super FREQ

There is no direct functionality to append.  You can create two data sets and then combine them with DATA step, PROC SQL, PROC APPEND, etc.  You can do this either after the PROC OPTMODEL call or from within PROC OPTMODEL by using a SUBMIT block:

create data mydata1 from ...;
create data mydata2 from ...;
submit;
   data mydata3;
      mydata1 mydata1;
   run;
endsubmit;
Santha
Pyrite | Level 9

Rob

I want to add a constraint UseProperRates  where I want only if the rates are greater than 1000 to be considered for model.

I did this but it is not working. 

 

con UseProperRates {p in Ports, t in Transit, c in LSP, d in DC}: InboundLinehaul[p,t,c,d] >=1000;

RobPratt
SAS Super FREQ

Hi Santha,

 

Please open a new thread for this new question, and I will answer it there.

 

Thanks,

Rob

Santha
Pyrite | Level 9

sure will do thanks

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 21 replies
  • 2200 views
  • 2 likes
  • 2 in conversation