Question 1
'FEB10'd is not a valid SAS data literal. SAS does not understand this. Date literals MUST (as in, not optional, this is mandatory) be a two digit day followed by a 3 letter month, followed by a 2 or 4 digit year (and good practice means you will use a 4 digit year). No exceptions.
So you can write '01FEB2010'd, SAS would understand this. But even so, I cannot yet write code for you, because I don't know what the variable MONTH contains. If it contains numeric SAS date values, representing the number of days since 01JAN1960, formatted in any way you want, then the code is:
If month >= '01FEB2010'd then x1=1;
However, if the variable MONTH is character, or a numeric number which is not a valid SAS date value, such as 201002 (which could be interpreted by humans as February 2010 but would not be interpreted by SAS as February 2010), then I need specifics about what variable MONTH contains.
Question 2: Same problem, same answer, SAS does not understand 'MAR2010'd.
... View more