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

Hello,

If I run the following code:

ODS SELECT GLM.ANOVA.AA.DiagnosticsPanel;
PROC GLM DATA = mydata1 PLOT = DIAGNOSTICS; CLASS A B; MODEL AA = A | B / SS3; OUTPUT OUT = res1 RESIDUAL = res1; RUN;


I can see the normal Fit Diagnostic plots. But if I run several commands:

ODS SELECT GLM.ANOVA.AA.DiagnosticsPanel;
PROC GLM DATA = mydata1 PLOT = DIAGNOSTICS; CLASS A B; MODEL AA = A | B / SS3; OUTPUT OUT = res1 RESIDUAL = res1; RUN;
ODS SELECT GLM.ANOVA.BB.DiagnosticsPanel;
PROC GLM DATA = mydata2 PLOT = DIAGNOSTICS; CLASS A B; MODEL BB = A | B / SS3; OUTPUT OUT = res2 RESIDUAL = res2; RUN;


There are warnings in the Log window:
WARNING:
Output 'GLM.ANOVA.BB.DiagnosticsPanel' 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.
WARNING:
The current ODS SELECT/EXCLUDE/OUTPUT statement was cleared because the end of a procedure step was detected. Probable causes for this include the non-termination of an interactive procedure (type quit; to end the procedure) and a run group
with no output.

 

In the Results window I can see normal Fit Diagnostic plots for AA, but for BB --- complete PROC GLM output (including diagnostics).

What's the reason ?

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenKuhfeld
Rhodochrosite | Level 12

Always put the ODS statements after the proc statement (even though they often work before).  Always end interactive procedures like glm and reg with a quit statement not a run statement.

 

http://support.sas.com/documentation/cdl/en/statug/67523/HTML/default/viewer.htm#statug_ods_examples...

View solution in original post

3 REPLIES 3
WarrenKuhfeld
Rhodochrosite | Level 12

Always put the ODS statements after the proc statement (even though they often work before).  Always end interactive procedures like glm and reg with a quit statement not a run statement.

 

http://support.sas.com/documentation/cdl/en/statug/67523/HTML/default/viewer.htm#statug_ods_examples...

Cynthia_sas
SAS Super FREQ

HI,
Since PROC GLM is one of the procedures that CAN be run interactively, my guess is that you would be better off ending each step with
RUN:
QUIT;
which should force each separate step to end by providing a "hard" step boundary. Frequently with ODS and procedures that support RUN group processing, if you want your desired output to be produced, you need to make sure you end the procedure BEFORE the destination closes. So typically, it would be something like this:

ods dest file='xxx.yyy';
ods select ???;
proc 1;
run;
quit;

ods select ???;
proc 2;
run;
quit;

ods dest close;

Cynthia

stan
Quartz | Level 8
WarrenKuhfeld and Cynthia_sas, thank you very much 🙂 (It works.)

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3 replies
  • 2250 views
  • 9 likes
  • 3 in conversation