LarrySteele
Programmer
Platform: SAS 9.1.3 on z/OS.
I'm trying to create a simple report title. The text should read: "EMPLOYEE POP AS OF YEAR END {last year}". Here's what I've done so far to create this:
[tt]%GLOBAL YR;
DATA _NULL_;
CALL SYMPUT('YR',YEAR(TODAY()) -1);
RUN;
[/tt]
In my Proc Tab section, I have:
[tt]TITLE 'EMPLOYEE POP AS OF YEAR END '&YR;[/tt]
Here is what actually displays on the output:
[tt]EMPLOYEE POP AS OF YEAR END 2006
[/tt]
I would like to remove the extra spaces between 'END' and '2006'. After searching here, SAS documentation, and Google, I've gather this together:
[tt]%GLOBAL YR;
%GLOBAL TITLETEXT;
DATA _NULL_;
CALL SYMPUT('YR',YEAR(TODAY()) -1);
CALL SYMPUT('TITLETEXT',
TRIM('EMPLOYEE POP AS OF YEAR END) ||
TRIM(YEAR(TODAY()) -1));
RUN;[/tt]
Then in my Proc Tab section, I put:
[tt]TITLE EMPLOYEE POP AS OF YEAR END '&YR;[/tt]
The output of this version is the same as above - I get extra spaces between the string and sas variable. I've wrapped both in trim functions and yet these spaces are still there.
Any suggestion on how to get rid of these spaces?
TIA,
Larry
I'm trying to create a simple report title. The text should read: "EMPLOYEE POP AS OF YEAR END {last year}". Here's what I've done so far to create this:
[tt]%GLOBAL YR;
DATA _NULL_;
CALL SYMPUT('YR',YEAR(TODAY()) -1);
RUN;
[/tt]
In my Proc Tab section, I have:
[tt]TITLE 'EMPLOYEE POP AS OF YEAR END '&YR;[/tt]
Here is what actually displays on the output:
[tt]EMPLOYEE POP AS OF YEAR END 2006
[/tt]
I would like to remove the extra spaces between 'END' and '2006'. After searching here, SAS documentation, and Google, I've gather this together:
[tt]%GLOBAL YR;
%GLOBAL TITLETEXT;
DATA _NULL_;
CALL SYMPUT('YR',YEAR(TODAY()) -1);
CALL SYMPUT('TITLETEXT',
TRIM('EMPLOYEE POP AS OF YEAR END) ||
TRIM(YEAR(TODAY()) -1));
RUN;[/tt]
Then in my Proc Tab section, I put:
[tt]TITLE EMPLOYEE POP AS OF YEAR END '&YR;[/tt]
The output of this version is the same as above - I get extra spaces between the string and sas variable. I've wrapped both in trim functions and yet these spaces are still there.
Any suggestion on how to get rid of these spaces?
TIA,
Larry