Premium

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



Question : You have written a SAS data step, and you know that you will be reading lines from a raw file in this data step. Now there will be
iteration during the execution phase of data step. What is the correct with regards to beginning of each data step?

 : You have written a SAS data step, and you know that you will be reading  lines from a raw file in this data step. Now there will be
1. Both the automatic variable _N_ and _ERROR_ will be set to missing values.

2. Both the automatic variable _N_ and _ERROR_ will be set to 0.

3. Access Mostly Uused Products by 50000+ Subscribers

4. All the variables, which are part of observation will be set to missing.


Correct Answer : Get Lastest Questions and Answer :
Explanation: At the beginning of the SAS data step execution all the variables will be part of observation will be set to o and other
variables like _N_ will be incremented by 1, because it represents how many observation have been read till now. Variable _ERROR_ will be set to 1 only
in case of there is an error. Once this is set to 1 it will not be reset until end of the file. In case there is n number of errors in the observation.




Question : You have been given below SAS program
data HADOOPEXAM ;
infile "/folders/myfolders/hedata/filtered1.dat";
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE$ 36-47
DURATION 48-50;
Total_FEE=FEE+FEE*18/100;
file print;
put COURSE_NAME Total_FEE COURSE_ID LOCATION$ FEE DATE DURATION;
run;

In which order the variables will be stored in SAS data set?


 : You have been given below SAS program
1. COURSE_NAME Total_FEE COURSE_ID LOCATION$ FEE DATE DURATION

2. Total_FEE COURSE_ID LOCATION$ FEE DATE DURATION COURSE_NAME

3. Access Mostly Uused Products by 50000+ Subscribers

4. COURSE_NAME COURSE_ID LOCATION$ FEE DATE DURATION Total_FEE


Correct Answer : Get Lastest Questions and Answer :
Explanation: It does not matter in what order the variables are in the raw file. This variables will be stored in the order in which they
are defined in the order in SAS data set.




Question : You have written a SAS code, which is being reviewed by one of the peer member in your team, and he told that this code has syntax error,
but SAS compiler cannot find it, what would happen, once you run the program?

 : You have written a SAS code, which is being reviewed by one of the peer member in your team, and he told that this code has syntax error,
1. All the variable will be initialized with the missing values.

2. All the observation once the program executed will have missing values.

3. Access Mostly Uused Products by 50000+ Subscribers

4. Program will not be able to execute


Correct Answer : Get Lastest Questions and Answer :
Explanation: If SAS DATA step has syntax error and which cannot be found during compilation phase. Then SAS program can bot be executed
during execution phase and error will be printed in the log.


Related Questions


Question :

The contents of the raw data file PRODUCT are listed below:
--------10-------20-------30
24613____$25.31
The following SAS program is submitted:
data inventory;
infile 'product';
input idnum 5. @10 price;
run;
Which one of the following is the value of the PRICE variable?


  :
1. 25.31
2. $25.31
3. Access Mostly Uused Products by 50000+ Subscribers
4. No value is stored as the program fails to execute due to errors


Question :

The following SAS program is submitted:
proc print data = sasuser.houses;
run;

proc means data = sasuser.shoes;
run;
Which one of the following OPTIONS statements resets the page number to 1 for the second report?


  :
1. options pageno = 1;
2. options pagenum = 1;
3. Access Mostly Uused Products by 50000+ Subscribers
4. options reset pagenum = 1;


Question :

Which one of the following is true of the SUM statement in a SAS DATA step program?

  :
1. It is only valid in conjunction with a SUM function.
2. It is not valid with the SET, MERGE and UPDATE statements.
3. Access Mostly Uused Products by 50000+ Subscribers
4. It does not retain the accumulator variable value from one iteration of the SAS DATA step to the next.


Question :

The following SAS program is submitted:
data work.new;
length word $7;
amount = 7;
if amount = 5 then word = 'CAT';
else if amount = 7 then word = 'DOG';
else word = 'NONE!!!';
amount = 5;
run;
Which one of the following represents the values of the AMOUNT and WORD variables?

  :
1. amount word
5 DOG
2. amount word
5 CAT
3. Access Mostly Uused Products by 50000+ Subscribers
7 DOG
4. amount word
7 ' ' (missing character value)


Question :

When the following SAS program is submitted, the data set SASDATA.PRDSALES contains 5000 observations:
libname sasdata 'SAS-data-library';
options obs = 500;
proc print data = sasdata.prdsales (firstobs = 100);
run;
options obs = max;
proc means data = sasdata.prdsales (firstobs = 500);
run;
How many observations are processed by each procedure?

  :
1. 400 for PROC PRINT
4500 for PROC MEANS
2. 401 for PROC PRINT
4501 for PROC MEANS
3. Access Mostly Uused Products by 50000+ Subscribers
4500 for PROC MEANS
4. 500 for PROC PRINT
5000 for PROC MEANS


Question :

In the following SAS program, the input data files are sorted by the NAMES variable:
libname temp 'SAS-data-library';
data temp.sales;
merge temp.sales
work.receipt;
by names;
run;
Which one of the following results occurs when this program is submitted?


  :
1. The program executes successfully and a temporary SAS data set is created.
2. The program executes successfully and a permanent SAS data set is created.
3. Access Mostly Uused Products by 50000+ Subscribers
4. The program fails execution because the SAS data sets on the MERGE statement are in two different libraries.