SAS Enterprise Guide

Desktop productivity for business analysts and programmers
BookmarkSubscribeRSS Feed
Gick
Pyrite | Level 9

TableSAS.PNG

Hi,

I have a SAS project (.egp) containing several SAS programs (.sas) named: cal, Lau, pest.

In Cal, I created a macro program and I want to call it to use in my Lau macro program. How to do ?

Can someone explain to me please?

 

Thank you

Gick

2 REPLIES 2
yabwon
Onyx | Level 15

In in the Process Flow you link codes you can organise them in such way that "A" will be executed before "B". 

You can do it by RMB click on a file and then select "Link to" option. 

Then run that path to get "final object" (test dataset in this case). In future runs RMB click on that final icon and select "Run to selected item".

 

yabwon_1-1696510099232.png

 

 

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Shmuel
Garnet | Level 18

What do you mean by "create a macro program" ? Is Cal itself a macro  program, starting with %macro <name>(...); and ending with %mend ? Or does it generate a macro program?

In first case you can just %include <path>/Cal.sas at the top of any program you want to use Cal macro program. The mcaro will be compiled at submission and used when called.

In second case you need to keep the generated macro progam as a <filename>.sas in a folder then use it as described above.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1026 views
  • 1 like
  • 3 in conversation