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
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
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.
I would simplify it, and use a subsetting IF:
if refdt gt today() - 180;
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!
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.
Ready to level-up your skills? Choose your own adventure.