Hello, I am reading page 293 of the Advanced Prep guide 4e. It uses a file called sasuser.all
but the file I downloaded from the books website is in sas7bvew.
if I double click it, it would be downloaded as a text file with all gibberish like this
How can I read this sas7bvew file in SAS studio?
Thanks in advance.
Okay, I found the solution. It is probably because I skipped the Proc SQL part of the book and when straight to Macro language part.
Note to myself or future readers of the book, to create the sasuser.all dataset used in the book, use the code below, and change the four tables to your own path (eg, a.SCHEDULE to yourpath.SCHEDULE)
proc sql; create table a.all2 as select students.student_name, schedule.course_number, paid, courses.course_code, location, begin_date, teacher, course_title, days, fee, student_company, city_state from a.SCHEDULE, a.STUDENTS, a.REGISTER, a.COURSES where (schedule.course_code = courses.course_code) and (schedule.course_number = register.course_number) and (students.student_name = register.student_name) order by students.student_name asc, courses.course_code asc; run;
Table name can't be yourpath.all because all.sas7bvew already exist.
This is a view, not a table.
https://documentation.sas.com/doc/en/pgmsascdc/v_036/engsas7bdat/p095ej3hnyskg7n1xdwmm71q6upf.htm
You can access the code for a view using Describe in either proc sql or via data step.
okay, I described the view with proc sql.
and I got
how can I turn it so that I can use it as a data set so that I can follow the original code used in the book?
proc tabulate data = a.all;
< More statements>;
run;
Sorry I don't understand.
proc tabulate data = a.all;
just gives me error.
oh wait I think I got the idea.
I prpb have to create a new data set from the SQL code that's stored in the all.sas7bvew.
Okay, I found the solution. It is probably because I skipped the Proc SQL part of the book and when straight to Macro language part.
Note to myself or future readers of the book, to create the sasuser.all dataset used in the book, use the code below, and change the four tables to your own path (eg, a.SCHEDULE to yourpath.SCHEDULE)
proc sql; create table a.all2 as select students.student_name, schedule.course_number, paid, courses.course_code, location, begin_date, teacher, course_title, days, fee, student_company, city_state from a.SCHEDULE, a.STUDENTS, a.REGISTER, a.COURSES where (schedule.course_code = courses.course_code) and (schedule.course_number = register.course_number) and (students.student_name = register.student_name) order by students.student_name asc, courses.course_code asc; run;
Table name can't be yourpath.all because all.sas7bvew already exist.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.