125k views
4 votes
Which assignment statement sets the value of Day to a text string that contains the day of the week that the current SAS session began?

a. Day=sysday;
b. Day=&sysday;
c. Day='&sysday';
d. Day="&sysday";

1 Answer

4 votes

Final answer:

The correct assignment statement for setting the value of Day to the day of the week when the current SAS session began is 'Day=&sysday;'. The '&' symbol is used in SAS to resolve macro variables.

Step-by-step explanation:

The assignment statement that sets the value of Day to a text string containing the day of the week when the current SAS session began is b. Day=&sysday;.

In SAS, the & symbol is used to resolve macro variables. When SAS encounters &sysday; within code, it replaces it with the value of the macro variable sysday which contains the day of the week the current SAS session started.

User Simon Righley
by
8.0k points