BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Nietzsche
Lapis Lazuli | Level 10

Hello, I am reading page 293 of the Advanced Prep guide 4e. It uses a file called sasuser.all

Nietzsche_0-1678918905524.png

 

but the file I downloaded from the books website is in sas7bvew. 

Nietzsche_1-1678918968147.png

if I double click it, it would be downloaded as a text file with all gibberish like this

Nietzsche_2-1678919008750.png

 

How can I read this sas7bvew file in SAS studio?

 

Thanks in advance.

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
1 ACCEPTED SOLUTION

Accepted Solutions
Nietzsche
Lapis Lazuli | Level 10

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.

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).

View solution in original post

7 REPLIES 7
Nietzsche
Lapis Lazuli | Level 10

okay, I described the view with proc sql.

and I got

Nietzsche_0-1678919913559.png

 

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?

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
SASKiwi
PROC Star
proc tabulate data = a.all;
< More statements>;
run;
Nietzsche
Lapis Lazuli | Level 10

Sorry I don't understand.

proc tabulate data = a.all;

just gives me error.

Nietzsche_0-1678920889210.png

 

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
Nietzsche
Lapis Lazuli | Level 10

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.

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
Nietzsche
Lapis Lazuli | Level 10

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.

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
john_mccall
SAS Employee
You can also run the following to see the tables referenced in the view.
Proc SQL feedback;
select * from sasuser.all;
quit;

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 2125 views
  • 2 likes
  • 4 in conversation