When you run macros multiple times, how do you make it so that each successful run will print on a new page instead of concatenating the next result to the previous one without a line break?
Example:
macro(a);
macro(b);
The result will be something like:
Page 1:
Successful run a
blah blah blah blah
Successful run b
more blah blah blah
*bunch of blank lines here*
Page 2:
How to make it so that the result from b will start on page 2 or if it is not possible is there a way to add blank lines in between the results? The example has two macros but needs this for a lot more macros.
Thanks!
Are you generating a document or printing directly to a printer?
If a document then what type? Options used?.
Macro or not the approaches are generally the same. But where/how you are "printing" is need to know. And the syntax varies a bit depending on the actual destination.
@cosmid wrote:
Sorry, when I said print, I meant by printing to the output window. When I run the code in SAS studio, with HTML there's a line break for each result, and with listing as the output window, each macro run returns at a new page. But when I do this in UNIX, each macro result just print right below the previous one, there isn't even a line break. So I was wondering if there's an option that I can add to separate each results either with a line break or make sure the new result starts off on a new page.
HTML doesn't really have a concept for "page" so sending such to HTML is pretty problematic.
If you mean the traditional OUTPUT window enabled with ODS LISTING then again, how the output is generated does come into play.
I am afraid a list of macro names without any details of the actual macro code involved isn't very helpful.
One caution: if you are setting options in SAS studio and then running on a different system then UNIX may use them differently.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.