BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Anirudh9
Obsidian | Level 7

My code looks like this:-

 

proc optmodel;

/*rest of my code */

solve;

print z;

print x;

print y;

 

 

When I run this I see the results as a report. I want z, x, y as a SAS table instead. z, x, y

 

I tried using

 

 

optmodel printlevel=2;
   ods output PrintTable=expt ProblemSummary=exps DerivMethods=exdm 
              SolverOptions=exso SolutionSummary=exss OptStatistics=exos;

 

 

 

but it only showed the table for z and not for x and y

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RobPratt
SAS Super FREQ

Here are three ways.

 

1. Use only one PRINT statement:

print z x y;

 

2. Use three PrintTable= options:

PrintTable=expt PrintTable#2=expt2 PrintTable#3=expt3

 

3. Omit the ODS statement and instead use CREATE DATA:

create data expt from z x y;

View solution in original post

2 REPLIES 2
RobPratt
SAS Super FREQ

Here are three ways.

 

1. Use only one PRINT statement:

print z x y;

 

2. Use three PrintTable= options:

PrintTable=expt PrintTable#2=expt2 PrintTable#3=expt3

 

3. Omit the ODS statement and instead use CREATE DATA:

create data expt from z x y;
Anirudh9
Obsidian | Level 7
Awesome! I tried option 2, it worked like a charm!

sas-innovate-2024.png

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

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
  • 2 replies
  • 609 views
  • 1 like
  • 2 in conversation