BookmarkSubscribeRSS Feed
Olanike
Fluorite | Level 6

Hello, I am just analyzing means of different treatments. My log is clean (no errors) but my SAS output is not showing. Please am I doing anything wrong?. My code  is  below. Thanking you in anticipation.

 

/* Generated Code (IMPORT) */
/* Source File: Swift.xlsx */
/* Source Path: /home/Ola.Omoga0/Swift_Yield */
/* Code generated on: 9/28/24, 2:09 PM */

%web_drop_table(WORK.IMPORT1);


FILENAME REFFILE '/home/Ola.Omoga0/Swift_Yield/Swift.xlsx';

PROC IMPORT DATAFILE=REFFILE
               DBMS=XLSX
               OUT=WORK.IMPORT1;
               GETNAMES=YES;
RUN;

PROC CONTENTS DATA=WORK.IMPORT1; RUN;
%macro Rotation (var);

%web_open_table(WORK.IMPORT1);


 proc mixed data= PotatoSwift;
  class Rep Trt;
   model &var = Trt;
   random Rep/solution;
   Lsmeans Trt/diff=all;
   run;
  
   ods output diffs=table;
   ods output lsmeans=Mylsmeans;
   Store Mylsmeans;
   run;
  
  data calc_lsd
  set table;
  lsd=stderr*tinv(1-(0.05/2),df);
  run;
  
   proc print data=calc_lsd;
   *var lsd estimate stderr df;
   run;
  
   proc plm restore=Mylsmeans;
   lsmeans Trt/pdiff adjust=tukey lines Alpha=0.05;
   run;
  
  mend Rotation;
  Rotation (var=Total_yield);
  Rotation (var=Leaves);
  run;
 
 
  endsas;
 

 

 

 

7 REPLIES 7
PaigeMiller
Diamond | Level 26

We don't know what is inside these macros that you use: %rotation and %web_open_table.

 

So any answer I give you is pure guesswork. However, it seems as if somewhere inside these macros, the output has been turned off. Best would be for you to turn on macro debugging options, run your code again, and see if there is any command shown in the resulting log that turns off the output. The macro debugging option is the command

 

options mprint;

 

Also, try this before your PROC MIXED

 

ods html;
ods html select all;

 

--
Paige Miller
Olanike
Fluorite | Level 6

Hello, Thank you for your response. I include the code you advised but still I got no result. I only have a clean log but no results.

 

I included "mend rotation" because I want to analyse multiple variables at once, please could that be the problem?, if yes what should it be.

 

Please find attached my code and log.

PaigeMiller
Diamond | Level 26

Many of us refuse to download and open Microsoft Office documents as they are a security threat. Please include your code in your reply by clicking on the text box icon ("little running man" icon) and pasting your code as text into that window.

--
Paige Miller
Quentin
Super User

How are you running this code? Are you using SAS Studio, enterprise guide, PC SAS, or submitting  a batch job?

 

The macros %web_drop_table and %web_open_table look like they're provided by SAS as autocall macros, to help with building custom tasks in Studio.  https://documentation.sas.com/doc/en/webeditorcdc/3.6/webeditordg/p0lt84u9bvaogbn1ktsbzolqbcp1.htm  Are you developing a custom task?

The Boston Area SAS Users Group (BASUG) is hosting an in person Meeting & Training on June 27!
Full details and registration info at https://www.basug.org/events.
Olanike
Fluorite | Level 6

Hello, Thank you for your response. I am using SAS University Edition, I did remove endsas; but still I got no results. Please is there another code would probably work better for me. I only want to determine significance in treatment means within a location and among locations because I have 5 locations.

 

Thank you.

Tom
Super User Tom
Super User

Did you really submit the 

endsas;

statement?

Because that does exactly what it says, it will end SAS.  Immediately.   Having that in a program is only useful if you are submitting the program to run in the background.  That is you signed onto some computer that had SAS installed on it and ran they program directly from the command using the SAS command.  And then looked that the .log and .lst files that the SAS program created.

 

If you use that with a front end tool like SAS/Studio or Enterprise Guide it means there is no way for your front end tool to return the results, because you just stopped the SAS session it was using to send the results back to you.

Astounding
PROC Star
There are at least two errors that make me question whether you have posted your actual code.
There's a missing semicolon before the SET statement after data calc_lsd. And there are many missing percent signs. For there is no such thing as a mend statement. It should be %mend; instead. And there id no Rotation statement in SAS. it should be %rotation.

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

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1785 views
  • 2 likes
  • 5 in conversation