4. If header is C then another condition will be checked
Correct Answer : Get Lastest Questions and Answer : Explanation: Here we need to understand if then else condition. If first condition header=C is true than course_name will be initialized. If condition is not true than else block will be executed where , another condition is present header=LF, if this condition is true than only location and fee will be initialized else not.
Question : You have been given below code, what that means
if header='C' then do;
if _N_ >1 then output; TOTAL_LOCATIONS=0; input course_name $; end;
A. _N_ value tells how many detail record have been read or time data steps is executed. B. If header=C and _N_ >1 then generate the output C. If header=C or _N_ >1 then generate the output D. Observation is generated only for the header record and no detail record will be read
Correct Answer : Get Lastest Questions and Answer : Explanation: As you know _N_ is an automatic variable, hence for each data step execution its value will be incremented by 1. Similarly for each as soon as header value is ك it will check for another condition _N_>1 if this both the conditions are true than only output will be generated else not.
Question : You have been given below dataset and SAS program, how many observation will be generated at the end of the program
Correct Answer : Get Lastest Questions and Answer : Explanation: As you can see there are on average 4 observation in each raw record. However, record 3 has only 1, which make total observation to 17 . But we are using option missover which generate empty values for missing observation. Hence, total generated observation in output are 20 only