Question : The following SAS program is submitted: libname company 'SAS-data-library'; proc sort data = employee.payroll; by EmployeeIDNumber; run; Write access has been granted to the EMPLOYEE library. Which one of the following represents how the observations are sorted? 1. EMPLOYEE.PAYROLL is recreated in sorted order by EmployeeIDNumber. 2. EMPLOYEE.PAYROLL is stored in original order, and a new data set PAYROLL is created in sorted order by EmployeeIDNumber. 3. EMPLOYEE.PAYROLL is stored in original order, and a new data set COMPANY.PAYROLLSORTED is created in sorted order by EmployeeIDNumber. 4. EMPLOYEE.PAYROLL is recreated in sorted order by EmployeeIDNumber, and a new data set PAYROLL is created in sorted order by EmployeeIDNumber.
Correct Answer : Get Lastest Questions and Answer : IF we do not create a new data set then it stores on original data in sorted form. It was the easiest question. no OUT so no new data. but the EMPLOYEE.PAYROLL is sorted order by EmployeeIDNumber.
Question : The SAS data set EMPLOYEE_INFO is listed below: IDNumber Expenses 2542 100.00 3612 133.15 2198 234.34 2198 111.12 The following SAS program is submitted: proc sort data = employee_info;
run; Which one of the following BY statements completes the program and sorts the data sequentially by ascending expense values within each ascending IDNUMBER value? 1. by Expenses IDNumber; 2. by IDNumber Expenses; 3. Access Mostly Uused Products by 50000+ Subscribers 4. by ascending IDNumber ascending Expenses;
Correct Answer : Get Lastest Questions and Answer : By default SAS will sort in ascending order, if you want descending then you specify descending keyword before the variable name. Now here we want ascending expense values within each ascending IDNUMBER value in our by statement we should have IDNUMBER first and then expenses.
Question : The SAS data set WORK.AWARDS is listed below: fname points Amy 2 Amy 1 Gerard 3 Wang 3 Wang 1 Wang 2 The following SAS program is submitted: proc sort data = work.awards; by descending fname points; run; Which one of the option from left image represents how the observations are sorted? 1. 2. 3. Access Mostly Uused Products by 50000+ Subscribers 4.
it displays descending order for the first variable Name is sorted in Desceding order and it can by any Wang but points is by default sorted in ascendign order therefore name: points wang 1 wang 2 wang 3 and so on.
Reason is SAS only applies the descending order to the immediate variable next to it, the descending term wont affect the second variable points
Question : What is the purpose or the MISSOVER option on the INFILE statement? 1. It prevents SAS from loading a new record when the end of the current record is reached. 2. It enables SAS to scan the input data records until the character string that is specified in the @`character-string' expression is round. 3. Access Mostly Uused Products by 50000+ Subscribers input tine for all the variables in the statement. 4. It causes the DATA step to stop processing if an INPUT statement reaches the end of the current record without finding values for all variables in the statement.