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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 379 views
  • 1 like
  • 3 in conversation