| Date: | Tue, 26 Nov 1996 09:08:19 GMT |
| Reply-To: | Clark Roberts <dacmr@MINDSPRING.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | Clark Roberts <dacmr@MINDSPRING.COM> |
| Organization: | Decision Analytics |
| Subject: | Re: Macro var not resolving. |
|---|
Double quotes have to be used to get a macro variable to resolve. Single
quotes treat it as text.
Calrk Roberts
_____________________________________________
On Mon, 25 Nov 1996 17:23:29 EST, Stephen Dybas <skd02@HEALTH.STATE.NY.US>
wrote:
>*** Resending note of 11/25/96 17:22
>To: . --ALBNYDH2
>
>*** Resending note of 11/25/96 17:17
>To: . --ALBNYDH2
>
>Hi all,
>
>Assuming the macro processor is turned on, why does YY not resolve to 95
>when inside the select block, using the date constant? The informat on the
>variable PERVAL is MMDDYY6. Sample data values would be 013195, 022895, etc.
>TIA for any thoughtful answers.
>
>80
>81 %LET YY = 95;
>82
>83 DATA JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC;
>84 SELECT (PERVAL);
>85 WHEN ('31JAN&YY'd) OUTPUT JAN;
> ___________
> 77
>ERROR: INVALID DATE/TIME/DATETIME CONSTANT '31JAN&YY'd.
>ERROR 77-185: INVALID NUMBER CONVERSION ON '31JAN&YY'd.
>
>
>86 WHEN ('28FEB&YY'd) OUTPUT FEB;
> ___________
> 77
>ERROR: INVALID DATE/TIME/DATETIME CONSTANT '28FEB&YY'd.
>ERROR 77-185: INVALID NUMBER CONVERSION ON '28FEB&YY'd.
>
>* Stephen Dybas skd02@health.state.ny.us
>* DOH - BHE
>* Room 1110, Corning Tower
>* (518) 473-7883
Clark Roberts
Decision Analytics, A SAS Institute Quality Partner(tm)
e-Mail dacmr@mindspring.com or
Clark_Roberts@depotech.com
Voice/Message/Fax: (619) 565-9627
Pager: (619) 975-0758
_____________________________________________
SAS and SAS Institute Quality Partner are
registered trademarks or trademarks of SAS
Institute Inc. in the USA and other countries.
______________________________________________
|