BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
acordes
Rhodochrosite | Level 12

It comes in handy to generate a proc casutil deletesource command for files in a caslib.

The %sashdat or csv option works as well. 

It works fine but I cannot "see" files of type png or html. 

How can I achieve this?

 

proc cas;
table.caslibinfo result=sss/caslib="mkt"  ;
table.fileinfo result=sss / path="%.xlsx caslib="mkt";
saveresult sss  dataout=work.xdata;
run;

proc sql;
    select catX(" ", 'deletesource casdata=', "'"||strip(name)||"'", ' ',  "incaslib='mkt'", " quiet;") into :str
    from work.xdata
where prxmatch("m/nom|denom|kpi/oi",name) or 1=1 order by name;
quit;

I then copy/paste the reult to a proc casutil step. 

proc casutil;
deletesource casdata= 'ALL_DENOMINADOR2.sashdat' incaslib='mkt' quiet;
deletesource casdata= 'CARTERA_2_CHECK_REMAPPED2.sashdat' incaslib='mkt' quiet;
deletesource casdata= 'CRISTAL_BALL.xlsx' incaslib='mkt' quiet;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
HarrySnart
SAS Employee

Hi @acordes you should be able to set the allFiles parameter to TRUE with the tables.fileInfo action

View solution in original post

1 REPLY 1
HarrySnart
SAS Employee

Hi @acordes you should be able to set the allFiles parameter to TRUE with the tables.fileInfo action

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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