Chapter Contents

Previous

Next
TITLE

TITLE



Specifies title lines for SAS output

Valid: anywhere
Category: Output Control


Syntax
Without Arguments
Arguments
Details
In a DATA Step or PROC Step
Customizing Titles in a PROC step
In a PROC step
Comparisons
Examples
See Also

Syntax

TITLE <n> <'text' | "text">;

Without Arguments

Using TITLE without arguments cancels all existing titles.


Arguments

n
specifies the relative line that contains the title line.
Range: 1 - 10
Tip: The title line with the highest number appears on the bottom line. If you omit n, SAS assumes a value of 1. Therefore, you can specify TITLE or TITLE1 for the first title line.
Tip: You can create titles that contain blank lines between the lines of text. For example, if you specify text with a TITLE statement and a TITLE3 statement, there will be a blank line between the two lines of text.

'text' | "text"
specifies text that is enclosed in single or double quotation marks.
Tip: For compatibility with previous releases, SAS accepts some text without quotation marks.
Tip: When writing new programs or updating existing programs, always surround text with quotation marks.
See Also: For more information about including quotation marks as part of the title, see the "Expressions" chapter in SAS Language Reference: Concepts.


Details

In a DATA Step or PROC Step

A TITLE statement takes effect when the step or RUN group with which it is associated executes. Once you specify a title for a line, it is used for all subsequent output until you cancel the title or define another title for that line. A TITLE statement for a given line cancels the previous TITLE statement for that line and for all lines with larger n numbers.

Operating Environment Information:    The maximum title length that is allowed depends on your operating environment and the value of the LINESIZE= system option. Refer to the SAS documentation for your operating environment for more information.  [cautionend]

Customizing Titles in a PROC step

You can customize titles by inserting BY variable values (#BYVALn), BY variable names (#BYVARn), or BY lines (#BYLINE) in titles that are specified in PROC steps. Embed the items in the specified title text string at the position where you want the substitution text to appear.

#BYVALn | #BYVAL(variable-name)
substitutes the current value of the specified BY variable for #BYVAL in the text string and displays the value in the title. Specify the variable with one of the following:

n
specifies which variable in the BY statement that #BYVAL should use. The value of n indicates the position of the variable in the BY statement.
Example: #BYVAL2 specifies the second variable in the BY statement.

variable-name
names the BY variable.
Example: #BYVAL(YEAR) specifies the BY variable, YEAR.
Tip: Variable-name is not case sensitive.

#BYVARn | #BYVAR(variable-name)
substitutes the name of the BY variable or label that is associated with the variable (whatever the BY line would normally display) for #BYVAR in the text string and displays the name or label in the title. Specify the variable with one of the following:

n
specifies which variable in the BY statement that #BYVAR should use. The value of n indicates the position of the variable in the BY statement.
Example: #BYVAR2 specifies the second variable in the BY statement.

variable-name
names the BY variable.
Example: #BYVAR(SITES) specifies the BY variable SITES.
Tip: Variable-name is not case sensitive.

#BYLINE
substitutes the entire BY line without leading or trailing blanks for #BYLINE in the text string and displays the BY line in the title.
Tip: #BYLINE produces output that contains a BY line at the top of the page unless you suppress it by using NOBYLINE in an OPTIONS statement.
See Also: For more information on NOBYLINE, see BYLINE.


In a PROC step

Follow these rules when you use #BYVAR, #BYVAL, and #BYLINE in the TITLE statement of a PROC step:


Comparisons

You can also create titles with the TITLES window.


Examples


See Also

Statement:

FOOTNOTE

System Option:

LINESIZE=


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.