DATA Step, Macro, Functions and more

ODS SELECT doesn't work for several PROCs compiled all at once

Accepted Solution Solved
Reply
Contributor
Posts: 66
Accepted Solution

ODS SELECT doesn't work for several PROCs compiled all at once

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 ?


Accepted Solutions
Solution
‎10-15-2017 01:20 PM
SAS Super FREQ
Posts: 295

Re: ODS SELECT doesn't work for several PROCs compiled all at once

[ Edited ]

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


All Replies
Solution
‎10-15-2017 01:20 PM
SAS Super FREQ
Posts: 295

Re: ODS SELECT doesn't work for several PROCs compiled all at once

[ Edited ]

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...

SAS Super FREQ
Posts: 8,866

Re: ODS SELECT doesn't work for several PROCs compiled all at once

[ Edited ]

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

Contributor
Posts: 66

Re: ODS SELECT doesn't work for several PROCs compiled all at once

Posted in reply to Cynthia_sas
WarrenKuhfeld and Cynthia_sas, thank you very much Smiley Happy (It works.)
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 290 views
  • 8 likes
  • 3 in conversation