ods output ModelANOVA = table1;
proc glm data=mydata;
class var1 var2;
model dependent = var1;
run;
ods output ModelANOVA = table2;
proc glm data=mydata;
class var1 var2;
model dependent = var1 var2;
run;
I can run each of these individually and it indeed gives me table1 and table2 as I expect them to look, with everything I need. But when I run both in the same go I get the following error:
WARNING: Output 'ModelANOVA' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify that the NOPRINT option is not used.
As you can see the noprint option is not used. Again, the code runs correctly if I run it separately, which tells me the issue isn't with the variables being misspelled or anything, but running both causes the second table to not be created. Why?
Nevermind, the issue was caused by using "run" at the end of my proc glm. Removing 'run' fixes the issue. What a stupid, unnecessary problem with an obtuse, nonsensical solution. This is why nobody uses SAS anymore.
Nevermind, the issue was caused by using "run" at the end of my proc glm. Removing 'run' fixes the issue. What a stupid, unnecessary problem with an obtuse, nonsensical solution. This is why nobody uses SAS anymore.
Interactive procedures preceded ODS by decades. Interactive procedures do not end until they hit a QUIT statement. If you put ODS OUTPUT statements after the PROC statement and appropriately end interactive procedures, everything will work as you expect.
https://documentation.sas.com/doc/en/statug/15.3/statug_ods_examples06.htm
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.