08-21-2012 10:12 AM
The following SAS code, why variable bbb can't be a date value like aaa?
length xx $9;
length xx3 $11;
08-21-2012 10:39 AM
When asigning bbb, you are putting the date constant within a string.
When asigning aaa (and yy3), the d-literal is in "open code", which SAS uses during execution time to interpret the contents of the preceding string. Having the data literal within a string will prevent the SAS from interacting with it.
08-21-2012 10:52 AM
You are confusing date literals with character variables, just because both involve quotes. XX3 is a character variable that happens to have quotes in its value, and then you appended a D when you assigned it to BBB. Result: BBB is a character variable.
SAS only know you are specifying a date literal when the program is being interpreted, not when it is being executed (after all XX3 could just a likely had a value of "abcdef"). Therefore the quotes need to be in the actual SAS script (either explicitly or through interpreting of macro variables). SAS will not look inside the value of XX3 to see that you intended it to be a date literal.
08-21-2012 11:08 AM
I have 30 emails from ypou on my inbox again. How hard is it for you to exclude my name from your distribution list? I have put stop on tacking issues and still receive your responses to other individauls's question. Please take a few minutes and exclude my name before you send any replies to anyone.
08-21-2012 11:46 AM
hi firstname.lastname@example.org, yu must had set receiving Email notification options and you specify you follow with Dr.Art.
you should login to your account manager to do something.
08-21-2012 11:49 AM
please check the attached files and follow the three steps to change your email settings. I chose to get notified when Cynthis posts. So when I select Cynthis you should select Art. in step one, click "view all participants", in step two, click "Art", in step 3, click "stop email notification". please let me know if you need further help.
08-21-2012 12:06 PM
Thank you Art,
base on your code,need is what I need:
if 0 lt need lt 55518 then put 'year of date between 1960 and 2112';
else put 'date illegal';
SAS code was updated by: Mike Davis
Need further help from the community? Please ask a new question.