I have the below code that I am running in Enterprise Guide and when the pdf is exported, it inserts unwanted blank pages that just say "(continued)." Is there something in my code causing this or that I can add that will remove them? It happens are random, and the blank pages vary each time I run the document. I have tried various ODS STARTPAGE controls and it still happens. Thank you!
ods pdf file="\\PATH\Overall by Departments by Faculty.pdf"
notoc
style=minimal;
options orientation=landscape nodate MISSING=0;
TITLE;
TITLE1 "Overall Department Course by Faculty Success Rate";
FOOTNOTE;
FOOTNOTE1 "Generated by the Office of Institutional Research on %TRIM(%QSYSFUNC(DATE(), NLDATE20.))";
PROC TABULATE
DATA=WORK.COURSE_INFO;
WHERE semesterText IN('FA','SP');
VAR enrolled wasSuccessful;
CLASS termOrder / ORDER=UNFORMATTED MISSING;
CLASS SUBJECT COURSENUMBER FACNAME / ORDER=UNFORMATTED MISSING;
TABLE
/* ROW Statement */
SUBJECT={LABEL=""} * COURSENUMBER={LABEL=""} * FACNAME={LABEL=""},
/* COLUMN Statement */
termOrder={LABEL=""} *(wasSuccessful={LABEL=""} * PctSum<enrolled>={LABEL="Success Rate"}*f=comma6.1
enrolled={LABEL=""} * N={LABEL="Total Class Size"} );;
FORMAT TERMORDER TERM.;
RUN;
RUN; QUIT;
TITLE; FOOTNOTE;
ods pdf close;
You might try the NOCONTINUED option on the table statement:
PROC TABULATE
DATA=WORK.COURSE_INFO;
WHERE semesterText IN('FA','SP');
VAR enrolled wasSuccessful;
CLASS termOrder / ORDER=UNFORMATTED MISSING;
CLASS SUBJECT COURSENUMBER FACNAME / ORDER=UNFORMATTED MISSING;
TABLE
/* ROW Statement */
SUBJECT={LABEL=""} * COURSENUMBER={LABEL=""} * FACNAME={LABEL=""},
/* COLUMN Statement */
termOrder={LABEL=""} *(wasSuccessful={LABEL=""} * PctSum<enrolled>={LABEL="Success Rate"}*f=comma6.1
enrolled={LABEL=""} * N={LABEL="Total Class Size"} )
/ NOCONTINUED
;
FORMAT TERMORDER TERM.;
RUN;
RUN; QUIT;
TITLE; FOOTNOTE;
You might try the NOCONTINUED option on the table statement:
PROC TABULATE
DATA=WORK.COURSE_INFO;
WHERE semesterText IN('FA','SP');
VAR enrolled wasSuccessful;
CLASS termOrder / ORDER=UNFORMATTED MISSING;
CLASS SUBJECT COURSENUMBER FACNAME / ORDER=UNFORMATTED MISSING;
TABLE
/* ROW Statement */
SUBJECT={LABEL=""} * COURSENUMBER={LABEL=""} * FACNAME={LABEL=""},
/* COLUMN Statement */
termOrder={LABEL=""} *(wasSuccessful={LABEL=""} * PctSum<enrolled>={LABEL="Success Rate"}*f=comma6.1
enrolled={LABEL=""} * N={LABEL="Total Class Size"} )
/ NOCONTINUED
;
FORMAT TERMORDER TERM.;
RUN;
RUN; QUIT;
TITLE; FOOTNOTE;
FWIW you don't have to use
SUBJECT={LABEL=""}
to suppress variable labels
SUBJECT=' '
with either single or double quotes, no or one space works fine. I used a space so it was easier to tell that I used two single quotes.
Which can shorten the code a making it a tad easier to read in my opinion. The var={<stuff>} is more useful if you are using the variable in multiple places and need different style and such settings at each use of a variable.
And you can override the label by placing text instead of blanks.
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →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.
Ready to level-up your skills? Choose your own adventure.