Premium

Base SAS Certified Associate: Programming Fundamentals Using SAS Questions and Answers (Dumps and Practice Questions)



Question : Given the SAS data set AGES:
AGES
AGE
---------
The variable AGE contains character values. The following SAS program is submitted:

data subset;
set ages;
where age> 12;
run;

How many observations are written out to the data set SUBSET?

 : Given the SAS data set AGES:
1. 0
2. 1
3. Access Mostly Uused Products by 50000+ Subscribers
4. 3

Correct Answer : Get Lastest Questions and Answer :

Explanation: Nothing will be written in subset, hence answer would be 0.






Question :
---+----10---+----20---+
son Frank 01/31/89
daughter June 12-25-87
brother Samuel 01/17/51

The following program is submitted using this file as input:

data work.family;
infile 'file-specification';
(insert INPUT statement here)
run;

Which INPUT statement correctly reads the values for the variable Birthdate as SAS date values?
 :
1. input relation $ first_name $ birthdate date9.;
2. input relation $ first_name $ birthdate mmddyy8.;
3. Access Mostly Uused Products by 50000+ Subscribers
4. input relation $ first_name $ birthdate : mmddyy8.;

Correct Answer : Get Lastest Questions and Answer :
INFORMAT variable-1 (...variable-n) (informat);
INFORMAT (variable-1) (... variable-n) (DEFAULT=default-informat);
INFORMAT variable-1 (...variable-n> informat (DEFAULT=default-informat);

An INFORMAT statement in a DATA step permanently associates an informat with a variable. You can specify standard SAS informats or user-written informats, previously defined in PROC
FORMAT. A single INFORMAT statement can associate the same informat with several variables, or it can associate different informats with different variables. If a variable appears in
multiple INFORMAT statements, SAS uses the informat that is assigned last.
CAUTION:
Because an INFORMAT statement defines the length of previously undefined character variables, you can truncate the values of character variables in a DATA step if an INFORMAT
statement precedes a SET statement.

An informat is used to translate the calendar date to a SAS date value. The date values are in the form of two-digit values for month-day-year, so the MMDDYY8. informat must be used.
When using an informat with list input, the colon-format modifier is required to correctly associate the informat with the variable name.

[Colon use]
The colon is called colon modifier, is generally used to prevent incomplete data read
Here's the situation you are using: meaning that has been read so far encountered in space (if it is a string variable then enrolled into space or colon defined length, which meets
on the first of which).
After reading region behind the data pointer in the region that the spaces, plus mtg of eight characters, a total of nine characters need to read
But if you use mmddyy8. 11-24-9, then it can only be read, if the rate of colon then read guaranteed space location, they are able to read as 11-24-99, if you put mmddyy8. Changed
mmddyy9. then all the same
Search colon modifier can see its usage




Question :
1---+----10---+----20---+
Jose,47,210
Sue,,108
The following program is submitted using the raw data file above as input:

data employeestats;
(insert INFILE statement here)
input name $ age weight;
run;
The following output is desired:

name age weightJose 47 210Sue . 108

Which of the following INFILE statement completes the program and accesses the data correctly?


  :
1. infile 'file-specification' pad;
2. infile 'file-specification' dsd;
3. Access Mostly Uused Products by 50000+ Subscribers
4. infile 'file-specification' missover;

Correct Answer : Get Lastest Questions and Answer :

Explanation: The PAD option specifies that SAS pad variable length records with blanks. The MISSOVER option prevents SAS from reading past the end of the line when reading free formatted
data. The DLM= option specifies the comma as the delimiter; however, consecutive delimiters are treated as one by default. The DSD option correctly reads the data with commas as
delimiters and two consecutive commas indicating a missing value like those in this raw data file.



Related Questions


Question : While creating a user defined format, you are creating a format for the numeric values. However, you know in your dataset it is possible
some values are missing than you also want to give label to the missing values as well. So what keyword you will be using as part of PROC FORMAT VALUE
statement?

 : While creating a user defined format, you are creating a format for the numeric values. However, you know in your dataset it is possible
1. NULL

2. MISSING

3. Access Mostly Uused Products by 50000+ Subscribers

4. OTHER

5. UNKNOWN



Question : Which of the following statement is correct with regards to the FORMAT PROCEDURE?
 : Which of the following statement is correct with regards to the FORMAT PROCEDURE?
1. When you use FORMAT as part of DATA step than FORMAT definition will be stored permanently with the data.

2. When you use FORMAT as part of PROC step than FORMAT definition will be stored permanently with the data.

3. Access Mostly Uused Products by 50000+ Subscribers

4. When you use FORMAT as part of PROC step than FORMAT definition will replace the existing label.



Question : You have created a format named HEFORMAT, when you want to apply this format to COURSE_NAME, what is the correct code syntax?

 : You have created a format named HEFORMAT, when you want to apply this format to COURSE_NAME, what is the correct code syntax?
1. Format COURSE_NAEM HEFORMAT;

2. Format COURSE_NAEM HEFORMAT. ;

3. Access Mostly Uused Products by 50000+ Subscribers

4. Format COURSE_NAEM=HEFORMAT;



Question : How would you print entire detail of a user defined format?

 : How would you print entire detail of a user defined format?
1. CATALOG

2. ALLFORMAT

3. Access Mostly Uused Products by 50000+ Subscribers

4. FMTLIB



Question : By default MEANS procedure generates which of the following statistics?
A. Number of missing variables
B. Mean
C. Standard Deviation
D. RANGE
E. MINIMUM

 : By default MEANS procedure generates which of the following statistics?
1. A,B,C,E
2. B,C,D,E
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,B,D,E


Question : You have a dataset named hadoopexam.dat, with various columns like course_name, fee, location, date, students etc. Now while using the
MEANS procedure you want that descriptive analysis can be done only for two variables course_name and fee, which of the following statement can be
helpful in that case?

 : You have a dataset named hadoopexam.dat, with various columns like course_name, fee, location, date, students etc. Now while using the
1. By course_name fee;

2. Class course_name fee;

3. Access Mostly Uused Products by 50000+ Subscribers

4. Var course_name fee;