LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 24 May 2002 15:11:12 -0400
Reply-To:   Howard_Schreier@ITA.DOC.GOV
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Howard_Schreier@ITA.DOC.GOV
Subject:   Re: TITLE - include the contents of a variable?

There are good reasons why your code did not work.

A TITLE statement is not really part of a PROC or DATA step. It can be placed before any step, or between steps, or after all steps (in which case it does nothing). Also, it persists. In other words, in which data set does YEAR appear?

Moreover, a TITLE statement does not in general vary (exception noted below), while a variable's value can change from observation to observation. In other words, which value of YEAR do you want?

If the TITLE is for output of a PROC step and if YEAR is a BY variable, see TITLE statement documentation for the #BYVAR, #BYVAL, and #BYLINE constructs. This is the exception to the "titles do not vary" rule.

For a DATA step, you would use PUT statements rather than TITLE statements to create headings.

On Fri, 24 May 2002 17:54:20 GMT, Elise Beauregard <elise.beauregard@MCGILL.CA> wrote:

>How do you include the contents of a variable in a TITLE? > >I want to include the variable YEAR in the title, and I know this doesn't >work: > >ex: TITLE 'Academic year' YEAR; >result: Academic year 2001


Back to: Top of message | Previous page | Main SAS-L page