I have the following code:
data sample1;
input a;
datalines;
1
2
3
run;
data sample2;
input b;
datalines;
1
2
3
run;
data sample3;
input c;
datalines;
1
2
3
run;
%macro print_sample(input_data);
proc print data=&input_data;
run;
%mend print_sample;
%print_sample(sample1);
%print_sample(sample2);
%print_sample(sample3);
As you can see, I just printed the 3 sample data. However, the result showing in UNIX is as follows:
The SAS System 15:01 Tuesday, June 8, 2021 1
Obs a
1 1
2 2
3 3
^L The SAS System 15:01 Tuesday, June 8, 2021 2
Obs b
1 1
2 2
3 3
^L The SAS System 15:01 Tuesday, June 8, 2021 3
Obs c
1 1
2 2
3 3
"The SAS System" for 2nd and 3rd result is right below the result of the first macro's result. Is there a way to insert a blank line in between the results or add a blank page?
I asked this before but didn't get a solution because I didn't provide any code and my question wasn't very clear. Please let me know if this is clear for what the objective is. Thank you for your help!
Who still uses listing output? Usually PDF, Word, Excel or HTML are standard these days.
Try adding blank title or footnote statements to add extra space, it's probably the quickest fix.
title ' ';
footnote ' ';
Example:
https://communities.sas.com/t5/New-SAS-User/Add-spaces-in-listing-file/td-p/592853
This has nothing to do with the macro processor.
There are already "blank lines" between the outputs. In fact each proc's output is starting on its own page. That is what the FORMFEED ('0C'x) character means.
@Tom wrote:
This has nothing to do with the macro processor.
There are already "blank lines" between the outputs. In fact each proc's output is starting on its own page. That is what the FORMFEED ('0C'x) character means.
Ah! The joys of trying to remember things like FORTRAN Carriage Control (or not) characters.
Makes me a tad nostalgic for the "not quite so good old days". 🤣
Who still uses listing output? Usually PDF, Word, Excel or HTML are standard these days.
Try adding blank title or footnote statements to add extra space, it's probably the quickest fix.
title ' ';
footnote ' ';
Example:
https://communities.sas.com/t5/New-SAS-User/Add-spaces-in-listing-file/td-p/592853
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.