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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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