In reply to RATNAKARAM SOWMYA.

&sysday automatic macro variable contains the day of the week on which a SAS session started. If you started your SAS session on Tuesday and keep it open for several days, then no matter when you run your code &sysday will always produce Tuesday. If you want to get the current day of week when your program runs you need to rely on the date() function. For example, the following code produces the day of week of the date of that code execution:

%put %sysfunc(date(),downame9.);

Function date() returns current date, and format downame9. converts that date into a word representing day of week.