Desktop productivity for business analysts and programmers

SAS EG - Clear Results

Reply
Contributor
Posts: 74

SAS EG - Clear Results

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)

Valued Guide
Posts: 2,111

Re: SAS EG - Clear Results

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.

Contributor
Posts: 74

Re: SAS EG - Clear Results

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

Respected Advisor
Posts: 3,065

Re: SAS EG - Clear Results

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.

Contributor
Posts: 23

Re: SAS EG - Clear Results

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.

Contributor
Posts: 74

Re: SAS EG - Clear Results

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.

Community Manager
Posts: 2,697

Re: SAS EG - Clear Results

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

Contributor
Posts: 74

Re: SAS EG - Clear Results

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.

Contributor
Posts: 74

Re: SAS EG - Clear Results

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

Please vote

New User
Posts: 1

Re: SAS EG - Clear Results

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.

Ask a Question
Discussion stats
  • 9 replies
  • 4910 views
  • 7 likes
  • 6 in conversation