Question 18: You have been given below raw data at دfolders/myfolders/hedata/wrongdata.dat
Which of the following program can generate output as below.
- filename allhecrs '/folders/myfolders/hedata/wrongdata.dat';
data course2017;
infile allhecrs;
input COURSE_ID COURSE_NAME$ LOCATION$ FEE ;
run;
proc print data=course2017;
run;
B.
filename allhecrs '/folders/myfolders/hedata/wrongdata.dat';
data course2017;
infile wrongdata.dat;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35;
run;
proc print data=course2017;
run;
C.
filename allhecrs '/folders/myfolders/hedata/wrongdata.dat';
data course2017;
infile allhecrs;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35;
run;
proc print data=course2017;
run;
D.
libname allhecrs '/folders/myfolders/hedata/wrongdata.dat';
data course2017;
infile allhecrs;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35;
run;
proc print data=course2017;
run;
- A
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering SAS Certification Material
Correct Answer : 3 Exp : As you will be reading rawfile, hence you need to use filename option at first. Hence, option 4 is out. As you can see it is a fixed width file without column name, hence you need to use and provide column width, which is not the case in 1st option , hence it is out.
You can access to full explanation to question and answer from this page.