Question 19: You have been given below raw data at دfolders/myfolders/hedata/wrongdata.dat
Where column widths are like that
COURSE_ID 1 to 3
COURSE_NAME 5 to 20
LOCATION 22 to 30
FEE 32-35
DATE 36-47
Which of the following program will generate output like this.
A.
data course2017;
infile allhecrs;
input COURSE_NAME$ LOCATION$ COURSE_ID FEE DATE date10.;
run;
proc print data=course2017;
run;
B.
data course2017;
infile allhecrs;
input COURSE_NAME$ 5-20 LOCATION$ 22-30 COURSE_ID 1-3 FEE 32-35 DATE date10. 36-47;
run;
proc print data=course2017;
run;
C.
data course2017;
infile allhecrs;
input COURSE_ID 1-3 COURSE_NAME$ 5-20 LOCATION$ 22-30 FEE 32-35 DATE date10. 36-47;
run;
proc print data=course2017;
run;
D.
data course2017;
infile allhecrs;
variable COURSE_NAME$ 5-20 LOCATION$ 22-30 COURSE_ID 1-3 FEE 32-35 DATE date10. 36-47;
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 : 2 Exp : You can use input statement to print fixed width data. However, you need to provide the exact width for each variable. However, here they want output to be in different order than actual file. You can access to full explanation to question and answer from this page.