1.
1) Proc print data=;
Var pid pid;
Correct Answer
B. 2 vaiable
Explanation
The correct answer is "2 variable" because the code is using the PROC PRINT statement to print data from a dataset, and the VAR statement is specifying that the variable "pid" should be included in the output. Since there is only one variable specified in the VAR statement, the correct answer is "2 variable".
2.
Data set existed with A1 A2 A3 A4 A5 Variables
Proc print data=;Var A1- A4;
Run;
Correct Answer
D. 4 variable
Explanation
The given code is using the PROC PRINT statement to print the data set. The VAR statement is specifying the variables to be printed, which are A1, A2, A3, and A4. Therefore, the correct answer is "4 variable" because the code is printing four variables from the data set.
3.
Library name existed with up to
Correct Answer
B. 8 characters
Explanation
The correct answer is 8 characters because it is the only option that is within the given range of library names with up to 5, 8, 32, or 16 characters.
4.
Print procedure default display data in output
Correct Answer
A. With variable names
Explanation
The correct answer is "With variable names" because when the print procedure is used with variable names, it will display the values of those variables in the output. This allows for a more clear and informative representation of the data being printed.
5.
Data values are separated by comma
Correct Answer
B. DSD more efficient
Explanation
DSD (Delimiter-Separated Values) is more efficient because it allows for the use of different delimiters, such as comma, tab, or semicolon, to separate data values. This flexibility allows for easier parsing and processing of the data. On the other hand, DLM (Delimiter-terminated Lines) only uses a specific delimiter, such as a comma, at the end of each line. This can be less efficient when dealing with complex data structures or when different delimiters are needed. Therefore, DSD is considered more efficient in terms of data separation.
6.
Change the variable names for reporting
Correct Answer
C. Label statement with label option
Explanation
The correct answer is "label statement with label option" because the label statement with label option allows you to change the variable names for reporting. This means that you can assign new names to variables in your dataset, making it easier to understand and interpret the data when generating reports. By using this option, you can provide more meaningful and descriptive names for variables, improving the clarity and usability of your reports.
7.
Data set storage area
Correct Answer
A. Libraries
Explanation
The correct answer is "Libraries" because it is the storage area where data sets are stored in SAS. The other options, such as "Work library" and "sasuser library," are specific types of libraries within the SAS system, but the general term for the storage area is simply "Libraries." The option "None" is not a valid choice as it does not describe the storage area for data sets.
8.
Set statement use in
Correct Answer
A. Only in dataset block
Explanation
The statement "Set" is used only in the dataset block. This means that the "Set" statement can be used to modify or manipulate data within a dataset, but it cannot be used in any other block or section of the code. It is exclusively limited to the dataset block for its functionality.
9.
Sort procedure submit with out by statement
Correct Answer
C. Error is occurred
Explanation
The correct answer is "Error is occurred" because the "sort" procedure requires a "by" statement to specify the variables by which the dataset should be sorted. Without the "by" statement, the procedure does not know how to sort the data and therefore an error occurs.
10.
Misspelled keywords SAS display
Correct Answer
B. Warning message
Explanation
The given answer "Warning message" is likely the correct answer because the question mentions "Misspelled keywords SAS display" and "Warning message" in the same context. This suggests that when misspelled keywords are used in SAS code, a warning message is likely to be displayed.
11.
Pageno global invoked depends on
Correct Answer
B. Number global option
Explanation
The correct answer is the "Number global option". This means that the page number displayed globally depends on the setting of the Number global option. In other words, if the Number global option is enabled or set to a specific value, the page numbers will be displayed accordingly throughout the document. If the Number global option is disabled or not set, the page numbers will not be displayed.
12.
Can you use period for character missing
Correct Answer
A. Yes
Explanation
The given correct answer is "Yes" because a period can be used to represent a missing character in certain cases, such as when censoring offensive language or when representing a pause or interruption in dialogue. However, it is important to note that this may not be the case in all situations, as different contexts and writing styles may have different conventions for representing missing characters.
13.
Sas default storage space for numeric variable
Correct Answer
B. 12 digits
Explanation
The correct answer is 12 digits. This means that by default, SAS will allocate enough storage space for a numeric variable to hold up to 12 digits. This is important because if a numeric value exceeds this limit, it may be truncated or rounded off, leading to potential loss of precision in calculations or data analysis. Therefore, it is crucial to consider the size of numeric variables when working with large numbers in SAS.
14.
Flow over option belongs to
Correct Answer
A. Infile statement
Explanation
The correct answer is Infile statement. This is because the "Flow over" option is used to specify how SAS should handle input data when it reaches the end of a record. The Infile statement is used to read data from an external file into a SAS program, and it includes options like "Flow over" to control how the data is processed. Therefore, the "Flow over" option belongs to the Infile statement.
15.
What is the smallest length for a numeric and character variable respectively ?
Correct Answer
A. 2 bytes and 1 byte
Explanation
The smallest length for a numeric variable is typically 2 bytes because it can store smaller numbers with fewer digits. On the other hand, the smallest length for a character variable is usually 1 byte because it can store a single character. Therefore, the correct answer is 2 bytes and 1 byte.
16.
Does SAS do power calculations via a PROC?
Correct Answer
D. No, but there are macros out there written by other users.
Explanation
The correct answer is "No, but there are macros out there written by other users." This means that SAS does not have a built-in PROC specifically for power calculations. However, users can utilize macros created by other SAS users to perform power calculations in SAS.
17.
What is _n_?
Correct Answer
A. The _n_ is variable automatically created by the SAS
Explanation
The correct answer is "The _n_ is variable automatically created by the SAS." In SAS, the _n_ variable is automatically created and contains the observation number of the data set being processed. It can be used in data step programming to refer to the current observation number.
18.
Where can a POINT= statement not be used in SAS?
Correct Answer
E. All the Above
Explanation
A POINT= statement in SAS is used to specify the observation number to read or write in a data set. The statement cannot be used when there is a BY statement, as the BY statement is used to group observations based on a variable. Similarly, a POINT= statement cannot be used when there is a WHERE or WHERE= option statement, as these statements are used to subset observations based on certain conditions. The POINT= statement also cannot be used in transport format or Sequential type of data sets, as it is specific to SAS data sets. Additionally, it cannot be used on a table from another RDBMS (Relational Database Management System). Therefore, all the given options are correct explanations for where a POINT= statement cannot be used in SAS.
19.
Does SAS compile or Interpret the data step that is submitted?
Correct Answer
A. Compiles
Explanation
SAS compiles the data step that is submitted. Compilation is the process of converting the data step into machine code that can be understood and executed by the computer. This allows for faster and more efficient processing of the data.
20.
Dataset existed with name , age, sex variables
Data ;
Set (keep=name drop=age);
Run;
Correct Answer
A. Name
Explanation
The given code is a SAS data step that creates a new dataset by keeping the variable "name" and dropping the variable "age" from the original dataset. Therefore, the correct answer is "Name".