BookmarkSubscribeRSS Feed
agoldma
Pyrite | Level 9

Is it possible to clear results programmatically in SAS-EG?

I would like to clear all results at the start of the project (or process flow)

10 REPLIES 10
Doc_Duke
Rhodochrosite | Level 12

I don't think that you can, but please make your question more specific

results as in "reports"

results as in "data from queries"

If you delete all results, you will often break links and end up with a real mess to clean up.

agoldma
Pyrite | Level 9

"Results" as in output of procedures that you can view on the screen -- on the Results tab of a program -- specifically results of the proc print

Also I would like to clear the log -- make it look like the step never ran -- which is realistic at the start of the project.

I'm able to delete the output from queries -- I can delete the temporary data sets using DATASETS KILL... at the beginning of the project. This keeps the objects in the project, but their data is really gone... which is good.

In Base SAS, I can say: DM OUT 'CLEAR';

Can I do something similar for the Results window in SAS-EG ?

I would like to clear all the results at the beginning of my project because I have some conditional steps that sometimes don't execute, and I don't want to see the results of previous runs in those steps.

Currently, I put a date-time stamp in the log, but I'd rather not see the output/results at all.

I guess I could use a macro variable with the values {"current","old"}, set this variable to "old" at the beginning of the project and then set it to "new" during the execution of this project and display this variable in the title of the results, but I would need a dozen such variables -- one for every step...  looking for a more efficient solution.

SASKiwi
PROC Star

As far as I am aware there is no command interface in EG to allow your program to do EG "housekeeping". If I'm running regular jobs I tend to schedule these as SAS batch jobs. The great thing about batch jobs is they have their own session, own log, and own output if you timestamp the files.

MumSquared
Calcite | Level 5

You can stop the resulting datasets from appearing in EG by ...

Menu tools / options  - opens a window

Then on the left select Results General, on the right hand side make sure "Automatically add output data to the project tree" is unticked.

agoldma
Pyrite | Level 9

Thank you for considering my predicament.

This suggestion might be useful for someone else, but in my case I already had "Automatically add output data to the project tree" unchecked. This option is useful for keeping the output data out of the project tree, but I'm looking for a way to clear results (and the log) behind every program-step at the start of running the whole project. The purpose is to prevent mistaking old results for new results. I have some conditional steps in my project that sometimes don't execute. Unfortunately the old results are still there, so it looks like the step executed until I look at the date-time stamp and see that it's old.

ChrisHemedinger
Community Manager

For an easy overview of which tasks ran at what date/time, try the Project Reviewer custom task:

How much time will your process flow take to run? - The SAS Dummy

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
agoldma
Pyrite | Level 9

Tanks, Chris

The Project Reviewer does look useful -- I can sort by the last modified date to see what didn't run in the expected order. If it's not in the expected order, then it didn't run in the most recent flow.

agoldma
Pyrite | Level 9

I submitted an idea with a similar name: SAS-EG Clear Results Programmatically

Please vote

Daniel_Kellis
Calcite | Level 5

I have found a way to clear results.

 

1. Copy the old program.

2. Create a new program.

3. Paste the program.

4. Delete the old program.

 

I agree that there should be a better way.

GenDemo
Quartz | Level 8
I know exactly what you mean. I prefer to work in base SAS, but was forced recently to migrate to EG.

I found this on Google, not sure if it works : dm 'clear log';

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 10 replies
  • 13939 views
  • 10 likes
  • 7 in conversation