- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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".
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.