BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Avijeet
Calcite | Level 5
proc sql;
delete from sashelp.class
where age>13;
quit;

Hi, I used the above mentioned SAS code to delete the observations from sashelp.class dataset whose age is greater than 13.

By doing so, 9 records got deleted. Now when I use Proc Print statement to display the same dataset, I only get 10 records instead of 19 which is obvious. How can I get back all the 9 deleted observations? I tried using Global statements but it didn't work out.

Now I can not perform any manipulations or analysis on a dataset that has incomplete observations.

Please help me solving this issue.

 

Thank you

Avijeet

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

I highly suspect that's an illegal version. Especially if you just installed it. 

 

Search SAS Analytics U and you can download and work with the latest version. It's free for learning. 

View solution in original post

5 REPLIES 5
Reeza
Super User

1. I'm surprised you were able to delete those rows, usually SASHELP is locked down.

2. You cannot replace the rows once their deleted unless you have some options set up on your server. You'll need to get the original dat a back somehow. Maybe a colleague will have it on their system? Its not just the data, its the labels and formats as well, so I recommend getting the SAS dataset from someone with a similar set up to yours. 

 

 

Avijeet
Calcite | Level 5

Hi,

FYI I am a student. I am learning SAS now and I don't use the licensed software.

I am using the university edition. What should I do to get back the deleted records?

 

Reeza
Super User

SAS UE doesn't allow you to do that. 

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
57
58 proc sql;
59 delete * from sashelp.class where age=13;
ERROR: User does not have appropriate authorization level for file SASHELP.CLASS.DATA.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
60 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 

@Avijeet wrote:

Hi,

FYI I am a student. I am learning SAS now and I don't use the licensed software.

I am using the university edition. What should I do to get back the deleted records?

 


What exactly do you mean by University Edition? If it's the one downloaded from SAS UE, the quickest way is to redownload the image and re-install. 
 
Avijeet
Calcite | Level 5

Just to confirm my software information is

SAS 9.1.3 Service Pack 4

XP_PRO platform and not the SAS UE edition.

I got it installed from the institute where I am undergoing training on SAS.

 

Thank you

Reeza
Super User

I highly suspect that's an illegal version. Especially if you just installed it. 

 

Search SAS Analytics U and you can download and work with the latest version. It's free for learning. 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 5 replies
  • 1126 views
  • 5 likes
  • 2 in conversation