You seem to have confused data set variables with macro variables.
The most important thing to remember when doing anything with
macros--including learning how to use them is this:
===A macro writes code.===
So, your %LET statement is assigning a value to a macro variable, and
that value will be treated as code.
When you use the macro variable in a TITLE statement (or anywhere else),
it will insert code.
What code do you want there? The string
So that's the value the macro variable needs to have. It's going to be
text, because code is text. It's not going to be a SAS date, because
you don't want a SAS date in your title--you want a text string.
is the macro language statement that will put the string you want into
the macro variable. And when you then use the macro variable within a
statement, it will insert the string into the statement, and you will be
using a macro to write code.
> Hi - I have a %LET statement which needs the input of a date, such as:
> %LET TRADE_DT="02DEC2002"D;
> When I put the title in the charts, the title has the letter 'D' at the end
> of the date. What can I do to remove the 'D' after the date? THanks!
> TITLE COLOR=BLUE "Chart on &TRADE_DT";
> The output would be 12DEC2002D