I'm trying to get my listing output to display results from the same procedure on the same page. While it works for all of my procedures, my listing output for some reason begins with all of my footnotes on separate pages and then numerous blank pages before eventually displaying my content about halfway down the document.
The first part of my code, which I assume to be the most relevant to this issue, is the following:
libname Lab1 "C:\Users\Cam\Documents\Lab1";
options pagesize = 20 topmargin = .5 bottom margin = .5
leftmargin = .5 rightmargin = .5;
PROC CONTENTS data = Lab1._all_;
title "Exercise 1";
footnote;
run;
However I see no reason in here for the listing to begin with blanks and footnotes. Any reason why this is?
Not sure why you would see blank pages. But it does seem strange to limit your pages to just 20 lines. That will not leave much rome for PROC CONTENTS to place much output on a page. Especially if you have any footnotes and/or titles. If you have the maximum of 10 title lines and 10 footnote lines then there will be zero lines left for the output.
Have you any previous FOOTNOTEs in your code ?
The statement footnote; means clear any footnote.
Usually I locate TITLEs and FOOTNOTEs before any printing procedure,
thus clearing previous definitions.
Try:
title "Exercise 1";
footnote;
proc contents data=lab1._all_;
run;
BTW, lab1._all_ will start each dataset contents in a new page.
I don't have any prior footnotes as the lines I posted are the exact beginning of my code. After fixing the _all_ and placing the footnote beforehand, I still have a print preview displaying the footnotes and several blank pages.
Hello @camlester and welcome to the SAS Support Communities!
To avoid unnecessary page breaks in procedure (listing) output you can use the FORMDLIM system option:
options formdlim=' ';
After your PROC step you may want to reset it to its default value:
options formdlim='';
Not sure why you would see blank pages. But it does seem strange to limit your pages to just 20 lines. That will not leave much rome for PROC CONTENTS to place much output on a page. Especially if you have any footnotes and/or titles. If you have the maximum of 10 title lines and 10 footnote lines then there will be zero lines left for the output.
I fixed the pagelines and restarted my SAS. I think part of the issue was the page sizes and the other was old blank pages being stored in the ouput, but it's all fixed now!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.