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

My apologies if this info is somehow already in here somewhere.  I cannot find it.  Perhaps my search terms are not adequate.

Anyhow, I'm looking to create "subfolders" for the shared datasets my group is storing.  You see, our company has not yet agreed to provide an actual SAS server, so for the time being we are stuck using libnames to point to folders on a file server to share data.  In the beginning, we only had a few datasets, so we were content to have a structure like this :

Local

  --> Libraries

         -->FolderOnFileServer

               -->Dataset01.sas7bdat

               -->Dataset02.sas7bdat

               -->Dataset03.sas7bdat

               -->etc...

Now, however we have a large number of datasets and having them all under 1 folder (libname) is getting a bit unwieldy.  I would like to create a structure similar to the below, but can't seem to find any clear documentation on how to do so.  Any (constructive Smiley Happy ) would be greatly appreciated.  Thanks.  -John

Local

  --> Libraries

         -->FolderOnFileServer

               -->SubFolder01OnFileServer

                      -->Dataset01.sas7bdat

                      -->Dataset02.sas7bdat

               -->SubFolder02OnFileServer

                      -->Dataset03.sas7bdat

                      -->Dataset04.sas7bdat

               -->SubFolder03OnFileServer

                      -->Dataset05.sas7bdat

               -->etc...

1 ACCEPTED SOLUTION
7 REPLIES 7
Reeza
Super User

Your file server is most likely a network drive.

You can create folders using dcreate function.

Or if you can navigate to the folders via Windows or Unix you can create them the old fashioned way Smiley Happy

It won't show up nested that way in SAS, more of a linear path instead

H4xc1ty
Fluorite | Level 6

Yes.  I should be more clear.  I've already created the folder structure on the file server.  That is not an issue.  It's getting them tree structure to appear that way in SAS for which I'm looking.  I've seen folders nested like this in an actual SAS server library tree, but not on a local.

Haikuo
Onyx | Level 15

John, Are you talking about library tree with many layers?

Haikuo

H4xc1ty
Fluorite | Level 6

From the root local server library (yellow), there would 2 additional layers.  Currently I can only create 1 (green)

Local

  --> Libraries

         -->FolderOnFileServer

               -->SubFolder01OnFileServer

                      -->Dataset01.sas7bdat

                      -->Dataset02.sas7bdat

               -->SubFolder02OnFileServer

                      -->Dataset03.sas7bdat

                      -->Dataset04.sas7bdat

               -->SubFolder03OnFileServer

                      -->Dataset05.sas7bdat

               -->etc...

Reeza
Super User

I don't think that's possible.

When I even see that in my server, the multiple links are via different server connections.

Haikuo
Onyx | Level 15

John,

Like and have already pointed out, SAS Base Library hierarchy can only have two laryers: Table and Library. However, noticing you are using EG, so there is possibility you can "achieve" the result using Metadata folder structure. You can set up OS alike folders, which can be nested many layers, with very literal naming conventions, and then point your libraries and tables to these folders regardless how they are stored physically. The way I like is to use Metadata library names as the folder name, so when I need a standalone code, I can easily determine the library name (metadate), then call it upon using Meta engine.

Hope this helps,

Haikuo

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 7 replies
  • 3522 views
  • 4 likes
  • 4 in conversation