ods pdf and proc print titles

Reply
Occasional Contributor
Posts: 6

ods pdf and proc print titles

Hi all,

I am using ODS PDF to generate data quality assurance (QA) reports, consisting of PROC PRINT line lists of records that violate specific data QA criteria.

I ONLY want to output user-defined procedure titles when records fit the specific QA criteria, and a line-list is generated.

Using PROC PRINT under ODS PDF with ODS NOPROCTITLE I have tried

ODS PROCLABEL ".....";

PROC PRINT

as well as specifying titles within the PROC PRINT procedure.

The NOPROTITLE eliminates outputting titles for empty linelists :-), but eliminates titles for linelists that should be output in my reports :-(.

Looking for a way to output linelist titles ONLY when records fit specific criteria.

Any thoughts appreciated.

Thanks,

Shawn

Super User
Posts: 19,833

Re: ods pdf and proc print titles

Not 100% sure I understand your question, Are you talking about conditional execution of a proc print statement? If so you'll have to venture into Macro/macro variables.

You can also use ODS TEXT= to put text into a document.

SAS Super FREQ
Posts: 8,868

Re: ods pdf and proc print titles

Hi:

  ODS NOPROCTITLE (or ODS NOPTITLE) has NO, zero, nada impact on the title that comes from the SAS Title statement.

  ODS NOPTITLE has an impact on "The MEANS Procedure", "The GLM Procedure", "The FREQ Procedure" -- those are "proc titles" and those and only those titles are impacted by ODS NOPROCTITLE.

    

  So, I agree with Reeza -- I don't understand what you mean. For example, PROC PRINT with a TITLE statement works for me, in the code below whether or not I have ODS NOPTITLE turned on. Can you post an example of what you mean using SASHELP.CLASS and SASHELP.SHOES????

cynthia

ods pdf file='c:\temp\showtitle.pdf';

 

title 'This is a Title';

proc print data=sashelp.class;

run;

ods ptitle;

proc freq data=sashelp.class;

title 'This is for PROC FREQ';

title2 'Notice "extra" procedure title';

tables age;

run;

ods noptitle;

proc freq data=sashelp.class;

title 'This is ALSO for PROC FREQ';

title2 'Notice that there is no "extra" procedure title on this report';

tables name;

format name $1.;

run;

 

ods noptitle;

proc print data=sashelp.class;

title 'Another PROC PRINT, Another Title';

run;

 

ods pdf close;

ods ptitle;

title; footnote;

Super User
Posts: 11,343

Re: ods pdf and proc print titles

Some sample code of what you tried is always appreciated.


Occasional Contributor
Posts: 6

Re: ods pdf and proc print titles

Thanks all. I think I can take the above and run with it from here.

Best to all.

So, for those interested, I found that my using STARTPAGE=NEVER causes only the first set of titles and footnotes to be output. When omitted, my proc titles generate correctly, though of course this significantly lengthens the output.

Ask a Question
Discussion stats
  • 4 replies
  • 521 views
  • 0 likes
  • 4 in conversation