Multiple choice technology programming languages

data test; a='A dataset'; run; %macro opends(name); %if %sysfunc(exist(&name)) %then %do; %let dsid=%sysfunc(open(&name,i)); %put data set &name; %end; %else %put Data set &name does not exist.; %mend opends; %opends(null); %opends(test); What will be written in the Log?

  1. Data set null does not exist. data set test

  2. data set test Data set null does not exist.

  3. ERROR : null not indentified.

  4. Data set null does not exist. Data set test does not exist.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The macro uses %SYSFUNC(EXIST(&name)) to check dataset existence. NULL is a special SAS dataset name that doesn't create actual output, so EXIST returns false, triggering 'does not exist'. The TEST dataset was created by the preceding DATA step, so EXIST returns true, executing the %DO block and writing 'data set test'. The macro processes both calls sequentially.