A SAS programmer uses the %SYSFUNC macro function in the following code: %let today = %sysfunc(today(), date9.); What does this code accomplish?
Select an answer to reveal the explanation.
Short Explanation
You're right to pick the option that assigns the current date formatted as a date9 value to the macro variable 'today'. %SYSFUNC(today(), date9) calls today(), applies the date9 format, and stores the result in &today.
Full Explanation
The correct choice is the one that assigns the current date formatted as a date9 value to the macro variable 'today' because %SYSFUNC(today(), date9) calls the SAS today() function, which returns today's SAS date serial number, and applies the date9 format to convert it to a character string like '29JUL2026', which is then stored in the macro variable 'today'. The option saying it creates a SAS dataset variable named 'today' is wrong because %LET creates a macro variable, not a DATA step variable. The option saying it opens a SAS function called 'today' with a date9 argument is wrong because the second argument to %SYSFUNC is an optional format, not a function argument. The option saying it assigns the numeric SAS date serial number without formatting is wrong because the date9 format is applied, converting the serial number to a formatted string.