ODS TEXT= strings might be displayed before the TITLE text in ODS PRINTER output created with SASĀ® 9.2


The ODS <destination> TEXT= statement is used to place text between tables and graphs in the non-Listing ODS destinations. If this statement is used with the ODS PRINTER (PCL, PDF, or PostScript) destinations to place text between a TITLE and a table with the STARTPAGE= option set to NO, OFF, or NEVER, the text position has changed in SAS 9.2. The TEXT= string might be displayed before the TITLE statement text.

For example, the following code is run in SAS 9.1.3:

title "This is a title in &sysver"; ods pdf file="&sysver..pdf" startpage=no notoc; ods pdf text = 'Is this text statement before the title or the table?'; proc print data=sashelp.class(obs=3); run; ods pdf close;

The following output is generated:

The text statement is after the title and before the table.

Using the STARTPAGE=NO option prevented the table from being moved to a new page. The TITLE statement text is first, then the TEXT= text, followed by the table.

The same code creates the following output in SAS 9.2:

The text statement is before the title and before the table. The title is bolded.

Notice that the TEXT= text precedes the TITLE text. To circumvent the issue and generate the same output in SAS 9.2 that was generated in SAS 9.1.3, modify the STARTPAGE= values. For example:

title "This is a title in &sysver"; ods pdf file="&sysver.workaround.pdf" startpage=now notoc; ods pdf startpage=no; ods pdf text = 'Is this text statement before the title or the table?'; proc print data=sashelp.class(obs=3); run; ods pdf close;

The following output is generated:

The text statement is after the title and before the table