BookmarkSubscribeRSS Feed
BrahmanandaRao
Lapis Lazuli | Level 10
How to delete last nth dataset
In a library
9 REPLIES 9
Reeza
Super User
PROC DATASETS - more details are required to identify the nth/last data set. Is that the last created data set or with largest N or a date stamp?
RichardDeVen
Barite | Level 11
  • Do your data set names have a numeric suffix, say IMPORT1 to IMPORT100 and if N=25 you want to delete either IMPORT1-25 or IMPORT76-100 ?
  • Do you want the delete the N newest data sets by modification date ?
  • Do you want the delete the N oldest data sets ?
BrahmanandaRao
Lapis Lazuli | Level 10
Which procedure or dictionary tables have to use
BrahmanandaRao
Lapis Lazuli | Level 10
Give solution
Tom
Super User Tom
Super User

@BrahmanandaRao wrote:
Give solution

To get a solution you need to define the problem in more detail.  Example would help. What is the criteria for ordering? Alphabetical by name?  Numeric by something else?  If so what?  So part of the filename?  Creation timestamp?

 

Show an example with 3 or 4 files and tell which one is the Nth and why.

Reeza
Super User

@BrahmanandaRao wrote:
Give solution

You shouldn't expect an answer or response longer than your question.

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!

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
  • 9 replies
  • 1154 views
  • 4 likes
  • 6 in conversation