BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I want to delete the last generation of my dataset so that it is not stored in my archives. Using the following code taken from the samples ....

data payroll(genmax=5);
input lname : $15. salary;
datalines;
Huang 50000
Lindstrom 45000
Smith 560000
Jackson 100000
;
run;

data payroll;
set payroll;
salary=salary*1.03;
run;

How can I delete a specific generation ?
Say this was an annual payroll file and I don't want to keep the erroneous one & the good one in the generational history.

Is it as easy as deleting the file with no # next to it (gennum=0)?

Thank in advance ...
1 REPLY 1
deleted_user
Not applicable
Ok tested it myself and simply deleting the dataset in the explorer window works and the generation #s automatically readjust themselves !

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 512 views
  • 0 likes
  • 1 in conversation