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

 

 

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? 

1 ACCEPTED SOLUTION

Accepted Solutions
toomanystepsint
Fluorite | Level 6

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.

View solution in original post

2 REPLIES 2
toomanystepsint
Fluorite | Level 6

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.

WarrenKuhfeld
Rhodochrosite | Level 12

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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 410 views
  • 0 likes
  • 2 in conversation