Correct Answer : Get Lastest Questions and Answer : Explanation: As you can see in the given condition AND : If both the conditions are true than final value will be true. In the given dataset COURSE_NAME='SAS' and DURATION=30 both are true. Hence then part will be executed so fee will become 10000. Next IF condition uses OR operator. Hence, any one condition is true than final value will also be true. So message will be 'LOW'So 2nd is a correct answer.
Question : Which is the correct statement regarding length of a variable in a SAS program? A. As soon as variable appear in data step and its value derive the length. B. Whatever length explicitly defined will be the length of that variable C. As soon as you do the assignment
Correct Answer : Get Lastest Questions and Answer : Explanation: It depends on various scenario, how to derive the actual length of a variable. If variable first found in data step with its value like v1=Low. Then its length will be decided as 3 byte. You can also explicitly define the variable length if not known initially using length statement like this length FEETYPE $ 8; It says FEETYPE is 8 character long variable.
Question : You have been given below program If course_name=SAS then fee=7000; If course_name=HADOOP then FEE=8000; If course_name^=HADOOP and COURSE_NAME^=SAS then FEE=5000;
Which of the following SAS program will be the same as given above?
1. IF COURSE_NAME=SAS then FEE=7000; Else if COURSE_NAME=HADOOP then FEE=8000; Else FEE=5000;
2. IF COURSE_NAME=SAS then FEE=7000; if COURSE_NAME=HADOOP then FEE=8000; Else FEE=NULL;
4. IF COURSE_NAME=SAS then FEE=7000; SELECT if COURSE_NAME=HADOOP then FEE=8000; Else FEE=5000;
Correct Answer : Get Lastest Questions and Answer : Explanation: Its all about which expression result in same result. Difference between forst option and given program is that. Given in question will evaluate each condition and will make program slower to execute. In option 1 only conditions will be executed until match happen. So in this case if nothing or last stamen match then considered worst case which is equal to the same in case of given question.
1. Delete the word THEN on the IF statement. 2. Add a semicolon at the end of the SET statement. 3. Place quotes around the value on the IF statement. 4. Add an END statement to conclude the IF statement
1. PRODUCT and SALES only 2. PRODUCT, MONTH, NUM_SOLD and COST only 3. PRODUCT, SALES, MONTH, NUM_SOLD and COST only 4. An incomplete output data set is created due to syntax errors