BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
LauriB
Fluorite | Level 6

I am trying to run the following program. I get the data to print out, and it is read correctly. However, I don’t see the rest of the outputs for the proc mixed statements. The log says there are no errors. I checked the results screen, but it does not show the results of the proc mixed statement, just the proc print of the data. I ran this program about a year ago, and iI could see the output.

 

ods listing;

ods HTML;

 

data CACachexiaTumorEffectMCA;

               infile "F:\ MCA CC WW for SAS.csv" dlm=',';

               input Group $ Tumor $ Diet $ TumorStatus $ Taxa70 Taxa76 Taxa77 Taxa78 Taxa79 Taxa80 Taxa112 Taxa115 Taxa116 Taxa117 Taxa118 Taxa119 Taxa128 Taxa129 Taxa171 Taxa200 Taxa201 Taxa202 Taxa203 Taxa204 Taxa206 Taxa207 Taxa250 Taxa251 Taxa263 Taxa264 Taxa265 Taxa266 Taxa267 Taxa268 Taxa269 Taxa270;

run;

 

ods html file="MCA taxa SAS repeat.html" path=" F:\ ";

ods html file="MCA taxa SAS repeat.xls" path=" F:\ ";

ods pdf file="F:\MCA taxa SAS repeat.pdf"; /* Adobe PDF

 

Proc print data=work. CACachexiaTumorEffectMCA;

run;

 

Proc mixed;

class Diet TumorStatus;

model Taxa70 = Diet|TumorStatus /outp=resids ddfm=kr;

repeated / TumorStatus = Diet;

lsmeans Diet|TumorStatus / pdiff adjust=tukey cl;

   ods output diffs=ppp lsmeans=mmm;

   *ods listing exclude diffs lsmeans;

run;

 

%include ' F:\ pdmix800.sas';

%pdmix800(ppp,mmm,alpha=.05,sort=yes);

run;

 

proc print data=mmm;

run;

 

data RxS; set mmm; if effect = 'diet*TumorStatus';

run;

 

proc plot data=Rxs; plot estimate*diet=TumorStatus;

OPTIONS PS=52 LS=101; run; OPTIONS PS=512 LS=101;

 

proc univariate data=resids plot normal;

var resid; run;

run;

quit;

 

ods html close;

ods xls close;

ods pdf close;

run;

quit;

 

1 ACCEPTED SOLUTION

Accepted Solutions
LauriB
Fluorite | Level 6

Thanks that was helpful. I dropped the pdf and it is running now.

View solution in original post

4 REPLIES 4
SASKiwi
PROC Star

Looks like you have an unmatched comment here:

ods pdf file="F:\MCA taxa SAS repeat.pdf"; /* Adobe PDF

Add a "*/" on the end of the line or remove the comment entirely. Once you've fixed the program I suggest you run it in a new SAS session.

LauriB
Fluorite | Level 6

Thanks that was helpful. I dropped the pdf and it is running now.

Cynthia_sas
SAS Super FREQ

Hi:

  Other problems I see, after you fix your other code problems are the ODS statements:

Cynthia_sas_0-1661732150863.png

 

  You should not try to "fake" ODS HTML with the file extension of XLS  for your FILE= option. With 2 ODS HTML statements one after the other, your second ODS HTML is going to essentially "negate" the first one. And, there's no need for using ODS HTML like this. Also, your ODS XLS CLOSE statement is incorrect. There is NOT any ODS XLS destination. You should see an error message in the log for this statement:

Cynthia_sas_1-1661732731849.png

 

You either need:

ods tagsets.excelxp file="c:\temp\xxx1.xml

... more code ...

ods tagsets.excelxp close;

 

OR --- you need to have

ods csv file="c:\temp\xxx2.csv";

... more code ...

ods csv close;

 

OR --- you need to have SAS 9.4 M2 or higher and then you can use:

ods excel file="c:\temp\xxx3.xlsx";

... more code ...

ods excel close;

 

  Any of these 3 methods are more reliable than trying to create an HTML file and name it an XLS file. And, depending on your version of Excel, it is just as likely that Excel will give you an error message when you try to open the file.

 

As an aside, I would not recommend using PROC PLOT. Depending on whether you have access to SAS/Graph or not, I'd recommend either PROC GPLOT or PROC SGPLOT instead. The image output, fonts and colors from these procedures will look much better than PROC PLOT output.

 

Cynthia

LauriB
Fluorite | Level 6

Thanks so much. This was very helpful. I got it to work. Yeah!

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 5952 views
  • 3 likes
  • 3 in conversation