Desktop productivity for business analysts and programmers

Unwanted deletion of WORK data when using multiple %INCLUDE statements

Accepted Solution Solved
Reply
Highlighted
Occasional Contributor
Posts: 16
Accepted Solution

Unwanted deletion of WORK data when using multiple %INCLUDE statements

Hello,

 

We have several SAS programs which utilize proc sql statements to pull different information. We have a master program which uses multiple %INCLUDE statements to run each of these programs and then parse the combined data. This master program runs fine in base SAS 9.4 but errors when attempting to run in SAS Enterprise Guide 9.4.

 

Reviewing the SAS log, I see that upon reading each new %INCLUDE statement, SAS is deleting all previous WORK datasets which were holding the datasets from the previous %INCLUDE statements.

 

Is there any way to prevent SAS from clearing the WORK data between %INCLUDE statements?

 

Please note that I would strongly prefer to not have to store this data in a permanent library; I would like to keep all data in the WORK library, if possible.

 

Thank you in advance for any help offered!


Accepted Solutions
Solution
‎03-20-2017 05:05 PM
PROC Star
Posts: 307

Re: Unwanted deletion of WORK data when using multiple %INCLUDE statements

Posted in reply to techsassy

Are you sure there is not code embedded in the %include files that is running proc datasets to delete files? WORK files should not be deleted just because they were generated as part of a %include.

View solution in original post


All Replies
Solution
‎03-20-2017 05:05 PM
PROC Star
Posts: 307

Re: Unwanted deletion of WORK data when using multiple %INCLUDE statements

Posted in reply to techsassy

Are you sure there is not code embedded in the %include files that is running proc datasets to delete files? WORK files should not be deleted just because they were generated as part of a %include.

Occasional Contributor
Posts: 16

Re: Unwanted deletion of WORK data when using multiple %INCLUDE statements

Posted in reply to collinelliot
Yes, we happened to discover a deeply-buried kill statement shortly after posting. Thank you for the quick replies!
Super User
Posts: 19,772

Re: Unwanted deletion of WORK data when using multiple %INCLUDE statements

Posted in reply to techsassy

Have you changed anything else in how you manage the code? 

Or is it a literal change of open program, run in EG, errors out?

 

Either way, this would be a good question to talk to SAS support because if there's an issue they either will or should know about it Smiley Happy

☑ This topic is solved.

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

Discussion stats
  • 3 replies
  • 156 views
  • 1 like
  • 3 in conversation