The SAS Output Delivery System and reporting techniques

Warning in Title Statement

Reply
N/A
Posts: 0

Warning in Title Statement

Hi gyes.

Please, explain me why it says warning.
theMonth and theYear are parameters.
My Code:
proc print data=table1;
title 'All newly made accounts on' &theMonth/&theYear;
run;

And it says next warning:
The TITLE statement is ambiguous due to valid options or unquoted text.

I have already tried in this way:
proc print data=table1;
title 'All newly made accounts on' !! &theMonth/&theYear;
run;

But it does not recognize !! as concatenation mark.

Also it could be great if instead number of month, I can output name of month. I know that there is special format for it, but I cannot apply it. P.S.: May be this post must be in EG Forum...

Message was edited by: Ihor
Super Contributor
Posts: 394

Re: Warning in Title Statement

SAS will resolve macro variables in double-quoted strings. Try this:

[pre]%let theMonth = June;
%let theYear = 2007;
title "All newly made accounts on &theMonth/&theYear";[/pre]
N/A
Posts: 0

Re: Warning in Title Statement

Thanks. It really works.

Also it could be great if instead number of month, I can output name of month. I know that there is special format for it, but I cannot apply it.
N/A
Posts: 0

Re: Warning in Title Statement

I'm not sure what you are trying to do here. You have created a macro symbol that contains the month name, and the title will reflect that name, not the month number.

If you are trying to create the month name and year automatically from the system date, then I have to tell you not to. When you report June's performance at the end of the month, it is likely to be July, and the report will be mistitled.

I presume you have some record selection process to identify the current transactions, and you should tie the record selection to the title in a single common step. If you provide that code to the forum, I can look at refining it.

Kind regards

David
Ask a Question
Discussion stats
  • 3 replies
  • 134 views
  • 0 likes
  • 2 in conversation