Premium

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



Question : Finish the ARRAY statement below to create temporary array elements that have initial values of , , , and . array goal{} ... ;

 : Finish the ARRAY statement below to create temporary array elements that have initial values of , , , and .  array goal{} ... ;
1. _temporary_ (8000 8300 8600 8900)
2. temporary (8000 8300 8600 8900)
3. Access Mostly Uused Products by 50000+ Subscribers
4. (temporary) 8000 8300 8600 8900

Correct Answer : Get Lastest Questions and Answer :

Explanation: To create temporary array elements, specify _TEMPORARY_ after the array name and dimension.
Specify an initial value for each element, separated by either blanks or commas, and enclose the values in parentheses.

Arrays in the SAS language are different from arrays in many other languages. A SAS array is simply a convenient way of temporarily identifying a group of variables. It is not a
data structure, and array-name is not a variable.

An ARRAY statement defines an array. An array reference uses an array element in a program statement.
To create a temporary array, use the _TEMPORARY_ argument. The following example creates a temporary array named TEST:
options nodate pageno=1 linesize=80 pagesize=60;

data score2(drop=i);
array test{3} _temporary_ (90 80 70);
array score{3} s1-s3;
input id score{*};
do i=1 to 3;
if score{i}>=test{i} then
do;
NewScore=score{i};
output;
end;
end;
datalines;
1234 99 60 82
5678 80 85 75
;

proc print noobs data=score2;
title 'Data Set SCORE2';
run;




Question : Based on the ARRAY statement below, select the array reference for the array element hadoop. array hadoopexam{,} hadoop-hadoop;
 : Based on the ARRAY statement below, select the array reference for the array element hadoop.  array hadoopexam{,} hadoop-hadoop;
1. hadoopexam{hadoop50}
2. hadoopexam{1,50}
3. Access Mostly Uused Products by 50000+ Subscribers
4. hadoopexam{3,0}

Correct Answer : Get Lastest Questions and Answer :

Explanation: This two-dimensional array would consist of three rows of 25 elements. The first row would contain hadoop1 through hadoop25, the second row would start with hadoop26 and end
with hadoop50, and the third row would start with hadoop51 and end with hadoop75.

To create a multidimensional array, place the number of elements in each dimension after the array name in the form {n, ... } where n is required for each dimension of a
multidimensional array.
From right to left, the rightmost dimension represents columns; the next dimension represents rows. Each position farther left represents a higher dimension. The following ARRAY
statement defines a two-dimensional array with two rows and five columns. The array contains ten variables: five temperature measures (t1 through t5) from two cities (c1 and c2):
array temprg{2,5} c1t1-c1t5 c2t1-c2t5;
SAS places variables into a multidimensional array by filling all rows in order, beginning at the upper-left corner of the array (known as row-major order). You can think of the
variables as having the following arrangement:
c1t1 c1t2 c1t3 c1t4 c1t5
c2t1 c2t2 c2t3 c2t4 c2t5





Question :

Given the contents of the raw data file EMPLOYEE:
----|----10----|----20----|----30
Amit
19/2/2004
ACCT
Rohit
22/5/2004
MKTG
Manglesh
14/3/2004
EDUC
The following SAS program is submitted:

data emps;
infile 'employee';
input@1 name$
@15 date (insert INFORMAT here)
@25 department$;
run;

Which INFORMAT correctly completes the program?

 :
1. date9
2. ddmmyyyy9
3. Access Mostly Uused Products by 50000+ Subscribers
4. ddmmyyyy10

Correct Answer : Get Lastest Questions and Answer :
Explanation: DATEw. day, month abbreviation, and year:

17oct91 ddmonyy DATETIMEw.d date and time: ddmonyy:hh:mm:ss
17oct91:14:45:32 DDMMYYw. day, month, year: ddmmyy, dd/mm/yy,
17/10/91 dd-mm-yy, or dd mm yy JULIANw. year and day of year (Julian dates): yyddd

91290 MMDDYYw. month, day, year: mmddyy, mm/dd/yy,
10/17/91 mm-dd-yy, or mm dd yy MONYYw. month abbreviation and year
Oct91 NENGOw. Japanese Nengo notation
H.03/10/17 TIMEw.d hours, minutes, seconds: hh:mm:ss 14:45:32 or hours, minutes: hh:mm.
WEEKVw. ISO 8601 year, week, day of week: yyyy-Www-dd
1991-W42-04 YYMMDDw. year, month, day: yymmdd, yy/mm/dd,
91/10/17 yy-mm-dd, or yy mm dd YYQw. year and quarter of year: yyQq 91Q4


Related Questions


Question : Which one of the following SAS statements correctly computes the average of four numerical values?

 : Which one of the following SAS statements correctly computes the average of four numerical values?
1. average = mean(num1 - num4);
2. average = mean(of num1 - num4);
3. Access Mostly Uused Products by 50000+ Subscribers
4. average = mean(num1 num2 num3 num4);


Question :

The following SAS program is submitted:
data work.test;
Author = 'Agatha Christie';
First = substr(scan(author,1,' ,'),1,1);
run;
Which one of the following is the length of the variable FIRST in the output data set?

 :
1. 1
2. 6
3. Access Mostly Uused Products by 50000+ Subscribers
4. 200


Question :

The following SAS program is submitted:
data work.test;
Author = 'Christie, Agatha';
First = substr(scan(author,2,' ,'),1,1);
run;
Which one of the following is the value of the variable FIRST in the output data set?


 :
1. A
2. C
3. Access Mostly Uused Products by 50000+ Subscribers
4. ' ' (missing character value)


Question :

The following SAS program is submitted:
data work.test;
Title = 'A Tale of Two Cities, Charles J. Dickens';
Word = scan(title,3,' ,');
run;
Which one of the following is the value of the variable WORD in the output data set?

 :
1. T
2. of
3. Access Mostly Uused Products by 50000+ Subscribers
4. ' ' (missing character value)


Question :

The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City_Country = substr(First,1,7)!!', '!!'England';
run;
Which one of the following is the length of the variable CITY_COUNTRY in the output data set?


 :
1. 6
2. 7
3. Access Mostly Uused Products by 50000+ Subscribers
4. 25


Question :
The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City = substr(First,1,7);
City_Country = City!!', '!!'England';
run;
Which one of the following is the value of the variable CITY_COUNTRY in the output data set?


 :
1. Ipswich!!
2. Ipswich, England
3. Access Mostly Uused Products by 50000+ Subscribers
4. Ipswich , England