BookmarkSubscribeRSS Feed
jplarios
Quartz | Level 8
Hi:
I am trying to automate something in EG. I have a process flow that starts up with a macro variable. I repeat this manually. I was wandering if I could create another process flow that will trigger another one and do some kind of a loop. any ideas?
6 REPLIES 6
Patrick
Opal | Level 21
Hi

One way would be to add a code node at the very beginning of your existing flow containing something like:

%macro LoopOverFlow(macrovar);

And then at the very end of your flow you add a second code node containing:

%mend;
data _null_;
input var $;
call execute('%LoopOverFlow('||var||')');
datalines;
abc
def
;
run;

And then just run the whole flow. Never tried it but that should let it loop.

HTH
Patrick
ChrisHemedinger
Community Manager
There isn't a way to chain process flows or represent a loop construct within SAS Enterprise Guide, at the moment.

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Patrick
Opal | Level 21
Hi Chris

When I first read your answer I thought you're talking about some wizard generated loop construct.

I would have bet that my proposition works (just pack the whole flow in a macro and then execute the macro).

So I tried now with a very simple example - and yes, you're right, it didn't work when I ran the whole branch (EG 4.3).

That actually confused me quite a bit so I exported the whole branch and copied it into a single code node. And then I executed this code node and it worked. Hmmm...!!

Honestly, Chris! If you want EG to be a developer’s tool then you will have to have a developer mode added which basically means:
- Add NOTHING to the code written
- WYSIWYG in regards of code

I have currently to use EG for writing ETL processes which in the end are executed in batch.

The only thing which I prefer over using good old PC SAS is that I just can disconnect/reconnect if my code goes berserk and that it’s very easy to execute the same code in different environments/on different servers.

But besides of very basic unit testing EG is more of a hassle than a help.

I sure can’t use any of the wizards because as we know if I later on would like to export the code I will get heaps of EG “garbage” which might even not work in batch unless I tweak the config.

And now I even learn that an exported flow executed via EG doesn’t behave the same as the flow executed directly in EG. I think no further comment is needed here.

Sorry Chris for my tone. I’m just a bit frustrated in the moment.

I appreciate your commitment and contributions to make the SAS world a better place a lot.

Thanks
Patrick Message was edited by: Patrick
TomKari
Onyx | Level 15
Hi, guys

This brings up somewhat of a philosophical issue that I grapple with. As soon as I see "automate", I think SAS DIS. I generally think of EG as an adhoc analytics tool.

I'm not sure it's fair to criticize EG for not having "industrial" features that one would associate with a production line.

I'd be interested in the views of others who use EG and the other SAS tools.

Tom
twocanbazza
Quartz | Level 8
Fully Agree...

EG Adhoc analysis etc, DIS ETL automation.... Bring on the day that we can open EG project in DIS and convert, or be able to deploy eg jobs to DIS....

Barry
Patrick
Opal | Level 21
Yep, I fully agree.

EG is an analysts tool!

The only issue I have: It's now also promoted as a developers tool and therefore new SAS deployments don't even install PC SAS anymore (and not everybody got DIS).

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 6 replies
  • 3850 views
  • 1 like
  • 5 in conversation