BookmarkSubscribeRSS Feed
rohitkrishna
Calcite | Level 5
DATA ML1;                 
INFILE CARDS;             
INPUT @1 FILENAME $CHAR10.
      @12 REFDT YYMMDD8.; 
CARDS;                    
LOAN_CREA 20/09/20        
LOAN_UPDT 18/09/20        
LOAN_MAIN 19/09/20        
 ;                         
RUN;      
DATA DEL;                                                    
SET ML1;                                                     
PUT @1 ' DELETE ' FILENAME;                                  
RUN;  

Hi All plz look above code i am facing one issue i want to delete older filename not recent one kindly find below my requirement

 My Req is :

LOAN_UPDT
LOAN_MAIN

Thanks & Regards

Rohit

4 REPLIES 4
rohitkrishna
Calcite | Level 5

Hi Kurtbremser,

Thanks for the quick response , as per below conversation i tried with one statement but it didn't work plz find below code 

IF REFDT LE INTNX('DAY', TODAY(),-180) THEN DELETE;

kindly share some solution for the above code issue 

Thanks & Regards 

Rohit  

PaigeMiller
Diamond | Level 26

What happened to make you say it didn't work? Please explain further. SHOW US what is wrong.

 

If there is an error in the log, please show us the entire log for the DATA step, including code in the log, and all NOTEs, WARNINGs and ERRORs. Please paste the log as text into the window that appears when you click on the </> icon.

--
Paige Miller

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 801 views
  • 0 likes
  • 3 in conversation