Sas Certification Sample Test 50

In: Computers and Technology

Submitted By xuefeihk
Words 4408
Pages 18
SAS 认证考试样题

1.A raw data file is listed below.
1---+----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; infile 'file-specification'; run;

Which INPUT statement correctly reads the values for the variable Birthdate as SAS date values?
a. input b. input c. input d. input relation relation relation relation $ $ $ $ first_name first_name first_name first_name $ $ $ $ birthdate birthdate birthdate birthdate date9.; mmddyy8.; : date9.; : mmddyy8.;

Correct answer: d 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. You can learn about
• •

informats in Reading Date and Time Values the colon-format modifier in Reading Free-Format Data.

2.A raw data file is listed below.
1---+----10---+----20---+--Jose,47,210 Sue,,108

The following SAS program is submitted using the raw data file above as input:
data employeestats; input name $ age weight; run;

The following output is desired:
name age weight Jose 47 210 Sue . 108

Which of the following INFILE statements completes the program and accesses the data correctly?
a. infile 'file-specification' pad; b. infile 'file-specification' dsd;
SAS 中文论坛网站 SAS 中文论坛 FTP 站

SAS 认证考试样题

c. infile 'file-specification' dlm=','; d. infile 'file-specification' missover;

Correct answer: b 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…...