Desktop productivity for business analysts and programmers

How to embed all SAS code into SEG project?

Reply
Frequent Contributor
Posts: 102

How to embed all SAS code into SEG project?

[ Edited ]

I know how to embed individual SAS code links in SEG.  Is there a way to tell SEG to embed all SAS code at once?

 

Conversely, is there a way to Save As all embeded SAS code into separate SAS code snippets?  I know I can save the entire SEG project as one giant SAS code module and I can save each code module as a SAS code.  But can I point SEG to a folder (in my case it's Windows) and have it use the existing module names to create separate SAS code files with *.sas extensions?

 

What I am trying to do is to import multiple SAS programs into SEG.  These are all parts of the code system used to run annual reports.  I need to make changes to those modules, run the new report based on the previous report's code and then save the updated code to a new location preserving the structure of the previous report.  I really don't want to merge all those multiple SAS code modules into a single giant SAS code module.

 

Also, I thought there was an OPTION for changing what happens when SAS code is opened in SEG.  By default, external SAS code is linked.  I thought I remembered an option to automatically embed rather than link the code.  Can's seem to find that option in SEG 7.11.  Am I imagning things?

 

Thanks in advance.

Super User
Posts: 5,369

Re: How to embed all SAS code into SEG project?

It sounds like the tool you are looking for is %INCLUDE:

 

options source2;

%include '\path\to\one\program.sas';

%include '\path\to\another\program.sas';

 

Any of the files can be updated, and the same project then would %INCLUDE the updated code.

Frequent Contributor
Posts: 102

Re: How to embed all SAS code into SEG project?

Not sure what you are thinking, Astounding. %INCLUDE has nothing to do with embedding. I already use %INCLUDE to assemble individual SAS modules into the final execution sequence.
Super User
Posts: 5,369

Re: How to embed all SAS code into SEG project?

Sorry, my bad.

Frequent Contributor
Posts: 102

Re: How to embed all SAS code into SEG project?

No biggie. Thanks for trying, anyways.
PROC Star
Posts: 1,146

Re: How to embed all SAS code into SEG project?

Probably through the Automation facilities, but it'll definitely take some effort.

 

Tom

Ask a Question
Discussion stats
  • 5 replies
  • 294 views
  • 0 likes
  • 3 in conversation