BookmarkSubscribeRSS Feed
Haris
Lapis Lazuli | Level 10

@Patrick , I get the 'copy', 'import' and 'open' parts.  That's not a problem.  I don't get why you are completely sidestepping the 'embed' part.  Are you saying I don't need to do that to accomplish my goal?  The key requirement is for four different programs to 'feed' off of the common code making small program-specific adjustments; e.g., 'Age GE 16' for one program and 'Age LE 18' for another, without sending those small changes to the mothership on the network.  If I don't embed, I need to make four copies of the source programs every cycle and that is exactly what I am trying to avoid.  EMBED does exactly what I need--it breaks the link between the program on the network and stores all changes in SEG project.  It's kinda like a coloring book, I want to import the outlines but each user gets to color in their own unique way.

 

For versioning, that's exactly what we do: simply copy all of the code from Fall cycle to Spring cycle to Fall cycle and so on.  The small variations between the programs we mostly manage with program-specific macro variables.  The ad hoc ones get saved in the logs.

Patrick
Opal | Level 21

@Haris 

O.k. - then I misunderstood part of your requirements. Well, you will have to replicate the code somewhere then whether that's now code embedded in EG or different external .sas files.

 

Just as an idea:

If your actual programs are parameterized then you could set the macro variables outside of the actual program which would allow you to work with a single code version. Just either define prompts in EG or have a first "init" code node where you define and populate the macro vars.

And just thinking a bit more: If you want to implement your programs with default parameters which get set in case they haven't been defined already upstream then you could use code as below: 

/* create and populate macro variable if it doesn't exist already */
%macro setMvarDefault(name,value);
  %if not %symexist(&name) %then 
    %do;
      %global &name;
      %let &name=&value;
    %end;
%mend;
%setMvarDefault(test,5);
%put &=test;

/* here the test that macro call won't overwrite pre-defined macro variables */
%let test=10;
%setMvarDefault(test,5);
%put &=test;
Suzy_Cat
Pyrite | Level 9
Hi @Haris, I totally understand your need and wish we could get there with what we exactly want to achieve. Please do advise if you eventually find the best solution to your question. I am really keen….
Suzy_Cat
Pyrite | Level 9

Cool, Thanks @Patrick! I am inspired and it looks like a good solution to my current situation!

Henrik_P
Calcite | Level 5

I have the same need and problem

 

There USED to be a way to do in EG 7.11. When you moved (via the right-click menue) sevral non-embeded programs to a different process flow, that would emebed them. However we switched to EG 7.15 and that feature* is nog longer present it seems. A pity for me.

 

*I think it was actually a bug. But I miss it now.  

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 19 replies
  • 4777 views
  • 4 likes
  • 8 in conversation