BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
laura6728
Obsidian | Level 7

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;

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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;

View solution in original post

3 REPLIES 3
ballardw
Super User

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;
laura6728
Obsidian | Level 7
That worked perfectly!! Thank you so much!!
ballardw
Super User

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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2747 views
  • 0 likes
  • 2 in conversation