Question : The following SAS program is submitted: data work.test; array agents{4} $ 12 sales1 - sales4; run; Which one of the following represents the variables that are contained in the output data set? 1. SALES1, SALES2, SALES3, SALES4 2. AGENTS1, AGENTS2, AGENTS3, AGENTS4 3. Access Mostly Uused Products by 50000+ Subscribers 4. None, the DATA step fails because the ARRAY statement can reference only pre-existing variables.
Correct Answer : Get Lastest Questions and Answer : array named 'agents' is temporary but variables created by array sales1- sales4 are stored in dataset. D is not correct, because we can define arrays for new variables to be created too. If we dont't give dimentions 'Sales1-sales4' only then variable named agents1-agents 4 will be stored in output dataset.
Question : The following SAS program is submitted: data work.test; set work.staff (keep = jansales febsales marsales); array diff_sales{3} difsales1 - difsales3; array monthly{3} jansales febsales marsales; run; Which one of the following represents the new variables that are created? 1. JANSALES, FEBSALES and MARSALES 2. MONTHLY1, MONTHLY2 and MONTHLY3 3. Access Mostly Uused Products by 50000+ Subscribers 4. DIFF_SALES1, DIFF_SALES2 and DIFF_SALES3
Correct Answer : Get Lastest Questions and Answer : The reason is if you look at the set statement : 'set work.staff (keep = jansales febsales marsales);' jansales, febsales, marsales are variables you are bringing in. The array: array diff_sales{3} difsales1 - difsales3;are the variables you want to create - since there is no other programming code to define the variables, SAS creates the variables the array defines. Since these arrays are numeric, the variables created are also numeric.
Question : On which portion(s) of a SAS data set does the PRINT procedure report?
Correct Answer : Get Lastest Questions and Answer : proc print only shows data portion of dataset and proc contents shows descriptor portion of a dataset. there are two portion of a data set- descriptor and data portion. the descriptor portion gives an insight into the data set and its variable attributes. whereas the data portion displays the data in listed column.
the descriptor portion of the data set can be viewed through 'proc content' and the data portion can be displayed through 'proc print'
1. This will be a character string with the value '04/01/2000' 2. This will be a character string with the value 'Monday, April 01, 2000' 3. Access Mostly Uused Products by 50000+ Subscribers 4. This will be a numeric value 04252000, representing the SAS date for April 01, 2000