Desktop productivity for business analysts and programmers

SAS EG - results lost after a run error

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

SAS EG - results lost after a run error

[ Edited ]

Hi,

i'm a new user to SAS EG but i've been using SAS Foundation for a few years now.

 

My issue:

I open and run sections of sas code in EG, but i find that whenever i run a section of code and get stopped due to errors, the results (i.e. macro variables created, libraries, temp datasets) from the previous sections of code i ran are all lost after and I need to rerun everything again.

 

am i using EG 'wrong'? i've never experienced something like this when i use SAS Foundation. 

 

thanks


Accepted Solutions
Solution
‎08-09-2016 06:56 PM
Super User
Posts: 3,233

Re: SAS EG - results lost after a run error

[ Edited ]

Submit in EG: proc options; run; and check in the log to see if the ERRORABEND SAS option is set. This may well explain the behaviour you are seeing - your session dropping if there is a SAS error. This option is not usually used for interactive SAS but it may be a default setting you are picking up from your SAS server.

View solution in original post


All Replies
Solution
‎08-09-2016 06:56 PM
Super User
Posts: 3,233

Re: SAS EG - results lost after a run error

[ Edited ]

Submit in EG: proc options; run; and check in the log to see if the ERRORABEND SAS option is set. This may well explain the behaviour you are seeing - your session dropping if there is a SAS error. This option is not usually used for interactive SAS but it may be a default setting you are picking up from your SAS server.

Community Manager
Posts: 2,889

Re: SAS EG - results lost after a run error

SAS Enterprise Guide works differently than SAS Foundation (Base SAS windowing environment).  When you run a program/task, the log/output/results of that task are replaced in your process flow, not accumulated.  Data sets and other files are not actually deleted (unless the code you run directs that to happen), but EG brings you back just the results of your latest "run".  If you have an error in the program, then you might not see any results.

 

If you want to see the log output accumulate, turn on the Project Log feature (View->Project Log). That will keep track of all of the SAS logs for each iteration of code you run.

 

Your data sets are always available in their respective libraries -- look at the Server List, navigate to the libraries you want, and add the data you want to track to your project.

 

Unlike Base SAS, SAS Enterprise Guide doesn't offer a good method for interactive procedures: the line-by-line submission of code for certain PROCs like PROC REG or IML or GLM -- those procedures that stay "open" until you submit a QUIT statement.  If you need that method of working in a client interface, SAS Studio (a web based programming interface for SAS) does offer a special interactive mode (but it's also not the default way of working).

☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 218 views
  • 0 likes
  • 3 in conversation