Question : You have written a SAS data step, and you know that you will be reading lines from a raw file in this data step. Now there will be iteration during the execution phase of data step. What is the correct with regards to beginning of each data step?
1. Both the automatic variable _N_ and _ERROR_ will be set to missing values.
2. Both the automatic variable _N_ and _ERROR_ will be set to 0.
4. All the variables, which are part of observation will be set to missing.
Correct Answer : Get Lastest Questions and Answer : Explanation: At the beginning of the SAS data step execution all the variables will be part of observation will be set to o and other variables like _N_ will be incremented by 1, because it represents how many observation have been read till now. Variable _ERROR_ will be set to 1 only in case of there is an error. Once this is set to 1 it will not be reset until end of the file. In case there is n number of errors in the observation.
Question : You have been given below SAS program data HADOOPEXAM ; infile "/folders/myfolders/hedata/filtered1.dat"; input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47 DURATION 48-50; Total_FEE=FEE+FEE*18/100; file print; put COURSE_NAME Total_FEE COURSE_ID LOCATION$ FEE DATE DURATION; run;
In which order the variables will be stored in SAS data set?
1. COURSE_NAME Total_FEE COURSE_ID LOCATION$ FEE DATE DURATION
2. Total_FEE COURSE_ID LOCATION$ FEE DATE DURATION COURSE_NAME
4. COURSE_NAME COURSE_ID LOCATION$ FEE DATE DURATION Total_FEE
Correct Answer : Get Lastest Questions and Answer : Explanation: It does not matter in what order the variables are in the raw file. This variables will be stored in the order in which they are defined in the order in SAS data set.
Question : You have written a SAS code, which is being reviewed by one of the peer member in your team, and he told that this code has syntax error, but SAS compiler cannot find it, what would happen, once you run the program?
1. All the variable will be initialized with the missing values.
2. All the observation once the program executed will have missing values.
Correct Answer : Get Lastest Questions and Answer : Explanation: If SAS DATA step has syntax error and which cannot be found during compilation phase. Then SAS program can bot be executed during execution phase and error will be printed in the log.
1. It is only valid in conjunction with a SUM function. 2. It is not valid with the SET, MERGE and UPDATE statements. 3. Access Mostly Uused Products by 50000+ Subscribers 4. It does not retain the accumulator variable value from one iteration of the SAS DATA step to the next.
1. The program executes successfully and a temporary SAS data set is created. 2. The program executes successfully and a permanent SAS data set is created. 3. Access Mostly Uused Products by 50000+ Subscribers 4. The program fails execution because the SAS data sets on the MERGE statement are in two different libraries.