KEMBAR78
SAS Base Programming For SAS 9 Exam - More Samples Q&A | PDF | Sas (Software) | Information Retrieval
0% found this document useful (0 votes)
210 views5 pages

SAS Base Programming For SAS 9 Exam - More Samples Q&A

The document contains 10 multiple choice questions about SAS programming. The questions cover topics like using PROC PRINT to change variable labels, determining the number of observations in output data sets created using SET statements, determining variable lengths after character manipulations, and using MERGE and PROC CONTENTS to work with multiple datasets.

Uploaded by

mukesh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
0% found this document useful (0 votes)
210 views5 pages

SAS Base Programming For SAS 9 Exam - More Samples Q&A

The document contains 10 multiple choice questions about SAS programming. The questions cover topics like using PROC PRINT to change variable labels, determining the number of observations in output data sets created using SET statements, determining variable lengths after character manipulations, and using MERGE and PROC CONTENTS to work with multiple datasets.

Uploaded by

mukesh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 5

Question: 1

The SAS data set SASUSER.HOUSES contains a variable PRICE which has been assigned a permanent label o !As"ing Price#. $hich SAS program temporaril% replaces the label !As"ing Price# with the label !Sale Price# in the o&tp&t' A ( proc print data ) sas&ser.ho&ses* label price ) !Sale Price#* r&n* + ( proc print data ) sas&ser.ho&ses label* label price !Sale Price#* r&n* C ( proc print data ) sas&ser.ho&ses label* label price ) !Sale Price#* r&n* , ( proc print data ) sas&ser.ho&ses* price ) !Sale Price#* r&n*

Answer: C Question: 2
The ollowing -AS program is s&bmitted. data wor".empsalar%*
set wor".people /in ) inemp0 wor".mone% /in ) insal0*

i insal and inemp* r&n* The SA- data set $OR1PEOP2E has 3 observations4 and the data set $OR15O6E7 has 8 observations. How man% observations will the data set $OR1.E5PSA2AR7 contain' A(9 +(3 C(8 , ( :;

Answer: A

Question: 3
The ollowing SAS program is s&bmitted. data wor".acco&nting*
set wor".dept: wor".dept;* <obcode ) =>A:?*

length <obcode @ A* r&n* A character variable named BO+CO,E is contained in both the $OR1.,EPT: and $OR1.,EPT; SAS data sets. The variable BO+CO,E has a length o 3 in the $OR1.,EPT: data set and a length o 8 in the $OR1.,EPT; data set. $hat is the length o the variable BO+CO,E in the o&tp&t data set' A(C +(3 C(8 ,(A

Answer: B Question: 4
-iven the SAS data set SAS,ATA.T$O. SAS,ATA.T$O D7 (( EE 3; 3F CG The ollowing SAS program is s&bmitted. data sas&ser.one one sasdata.three* set sasdata two* i H ) 3 then o&tp&t sas&ser.one* else o&tp&t sasdata three* r&n* $hat is the res&lt' A ( The data set SASUSER.O6E has 9 observations4 the data set O6E has 9 observations4 and the data set SAS,ATA.THREE has 9 observations. + ( The data set SASUSER.O6E has ; observations4 the data set O6E has 9 observations4 and the data set SAS,ATA.THREE has : observation. C ( The data set SASUSER.O6E has ; observations4 the data set O6E has C observations4 and the data set SAS,ATA.THREE has : observation. , ( 6o data sets are o&tp&t. The ,ATA step ails eHec&tion d&e to errors.

Answer: B Question: 5
The ollowing SAS program is s&bmitted. ootnote : =Sales Report or 2ast 5onth?* ootnote; =Selected Prod&cts Onl%?* ootnoteC =All Regions?* ootnoteF =All >ig&res in Tho&sands o ,ollars?* proc print data ) sas&ser.shoes* ootnote; =All Prod&cts?* r&n* $hich ootnote/s0 isIare displa%ed in the report' A ( All Prod&cts + ( Sales Report or 2ast 5onth All Prod&cts C ( All Prod&cts All Regions All >ig&res in Tho&sands o ,ollars , ( Sales Report or 2ast 5onth All Prod&cts All Regions All >ig&res in Tho&sands o ,ollars

Answer: B Question: 6
-iven the raw data record ,EPT. ((((J((((:9(((J((((;9(((J((((C9 Printing 839 The ollowing SAS program is s&bmitted. data bon&s* in ile =dept?* inp&tdept@ :(:: n&mber :C( :3* Kinsert statement hereL r&n* $hich SAS statement completes the program and res&lts in a val&e o =Printing839? or the ,EPART5E6T variable' A ( department ) dept II n&mber* + ( department ) le t/dept0 II n&mber* C ( department ) trim/dept0 n&mber* , ( department ) trim/dept0 p&t/n&mber4C.0*

Answer: D

Question: 7
The ollowing SAS program is s&bmitted. data one* addressl ) =;:F 2ondon $a%?* r&n* data one* set one* address ) tranwrd/address:4 =$a%?4 =,rive?0* r&n* $hat are the length and val&e o the variable A,,RESS' A ( 2ength is :F* val&e is =;:F 2ondon ,ri?. + ( 2ength is :F* val&e is =;:F 2ondon $a%?. C ( 2ength is :G* val&e is =;:F 2ondon ,rive?. , ( 2ength is ;99* val&e is =;:F 2ondon ,rive?.

Answer: D Question: 8
The ollowing SAS program is s&bmitted. data wor".sets* do &ntil /prod gt G0* prod M :* end* r&n* $hat is the val&e o the variable PRO, in the o&tp&t data set' A(G +(8 C(A , ( /missing n&meric0

Answer: B

Question: 9
-iven the SAS data sets E5P2O7EE and SA2AR7. E5P2O7EE SA2AR7 >name age name salar% +r&ce C9 +r&ce ;3999 ,an F9 +r&ce C3999 ,an ;3999 The ollowing SAS program is s&bmitted. data wor".empdata* Kinsert 5ER-E statement hereL b% name* totsal M salar%* r&n* $hich 5ER-E statement correctl% completes the program' A ( merge emplo%ee salar% rename ) name ) name* + ( merge emplo%ee salar% rename/name ) name0* C ( merge emplo%ee salar% /rename ) / name ) name00* , ( merge emplo%ee salar% /rename ) /name ) name00*

Answer: D Question: 10
$hich program displa%s a listing o all data sets in the SASUSER librar%' A ( proc contents lib ) sas&ser.all* r&n* + ( proc contents data ) sas&ser.all* r&n* C ( proc contents lib ) sas&ser.EalIE* r&n* , ( proc contents data ) sas&ser.EallE* r&n*

Answer: D

You might also like