BookmarkSubscribeRSS Feed
sathya66
Barite | Level 11

Hi,

is there any way we can get the SAS E miner projects list from a Physical folder.

ex:if we use %mdsecgo, membertypes="MiningProject" then it will give all miner projects in metadata. but I am looking for Physical E miner projects list.

 

Thanks,

SS

 

3 REPLIES 3
Kurt_Bremser
Super User

If your miner projects storage location is on the SAS server, you can use data step functions to retrieve your filenames:

data projectfiles;
length fref $8 pname $200;
did = filename(fref,"path_to_your_project_files");
did = dopen(fref);
if did
then do;
  do i = 1 to dnum(did);
    pname = dread(did,i);
    if scan(pname,-1,'.') = 'emp' then output;
  end;
  did = dclose(did);
end;
did = filename(fref);
run;
    
sathya66
Barite | Level 11
Thanks for this,
Table has 0 records.
I think it is not checking the sub folders and also I need path for the "project.emp"
Kurt_Bremser
Super User

In order to scan a physical folder, you have to know the complete path to it. That is essential.

 

Once you know that, @Tom has a very nice method to traverse a whole directory tree in a single data step.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 780 views
  • 0 likes
  • 2 in conversation