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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 284 views
  • 0 likes
  • 2 in conversation