Dear All,
My code doesn't work as intended. What I want to do is to save two results in ODS DOCUMENT named temporary and to recall them later by using PROC DOCUMENT.
When I run the code once, it seemed that it worked given that there was no error. PROC DOCUMENT also showed two results from previous PROC PRINT.
But when I run the code again (i.e., twice), PROC DOCUMENT showed "two times" of what I expect to see. It implies that ODS DOCUMENT CLOSE didn't work as I intended. Instead, ODS DOCUMENT seems to keep recording the code that has been executed. Did I do something wrong? Thanks for reading.
ods document name= temporary;
proc print data= sashelp.cars (obs= 10); run;
proc print data= sashelp.stocks (obs= 10);run;
ods document close;
proc document name= temporary; replay; run; quit;
Use the WRITE access option.
When I run your code:
ods document name=temporary;
proc print data= sashelp.cars (obs=10);
run;
proc print data= sashelp.stocks (obs=10);
run;
ods document close;
proc document name=temporary;
replay;
run;
quit;
repeatedly, I always get the same output: PRINT for cars and stocks from the original call, and then again from the REPLAY.
Cancel the above; I had only the PROC DOCUMENT marked when hitting "submit".
SIG_NOT_ENOUGH_COFFEE.
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.