Correct Answer : Get Lastest Questions and Answer : Explanation: Column Input required that each column should have fixed width. Option B does not satisfy this. And it can read only numeric and character values and cannot read special character like $.
Question : You have been given below raw data at دfolders/myfolders/hedata/wrongdata.dat
Which of the following program can generate output as below.
A. filename allhecrs '/folders/myfolders/hedata/wrongdata.dat'; data course2017; infile allhecrs; input COURSE_ID COURSE_NAME$ LOCATION$ FEE ; run; proc print data=course2017; run;
Correct Answer : Get Lastest Questions and Answer : Explanation: 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. In option 2 it had used only infile option with filename without the path. Which is not correct you need to provide full path of the file or fileref which points to the actual file. Hence, option 2 is out. The only option remain is 3rd which is correct.
Question : 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;
Correct Answer : Get Lastest Questions and Answer : Explanation: 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. The best option is in the input statement put the variable in the order in which they need to be used. In option 4 it had used variable statement instead of input, hence this is not correct.
1. The program executes, but the age values are missing in the output. 2. The program executes, but the date values are missing in the output. 3. Access Mostly Uused Products by 50000+ Subscribers 4. The program fails to execute because the date informat is coded incorrectly.
1. the list of all data set names in the Sasuser library only 2. the descriptor portion of the data set named Sasuser._All_ 3. Access Mostly Uused Products by 50000+ Subscribers 4. the list of data set named in the Sasuser library plus the descriptor portion of every data set in the Sasuser library.