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
Ammonite | Level 13

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
Ammonite | Level 13

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