Desktop productivity for business analysts and programmers

How do I create "subfolders" in the Local Server (SAS 9.3 / EG 4.3)

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 16
Accepted Solution

How do I create "subfolders" in the Local Server (SAS 9.3 / EG 4.3)

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


Accepted Solutions
Solution
‎05-08-2014 10:55 AM
Esteemed Advisor
Posts: 6,661

Re: How do I create "subfolders" in the Local Server (SAS 9.3 / EG 4.3)

SAS libraries are always flat, there can be no hierarchy beyond library.member.

Hierarchies are possible in the "Files" section of the server.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Grand Advisor
Posts: 17,355

Re: How do I create "subfolders" in the Local Server (SAS 9.3 / EG 4.3)

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

Occasional Contributor
Posts: 16

Re: How do I create "subfolders" in the Local Server (SAS 9.3 / EG 4.3)

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.

Respected Advisor
Posts: 3,124

Re: How do I create "subfolders" in the Local Server (SAS 9.3 / EG 4.3)

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

Haikuo

Occasional Contributor
Posts: 16

Re: How do I create "subfolders" in the Local Server (SAS 9.3 / EG 4.3)

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

Grand Advisor
Posts: 17,355

Re: How do I create "subfolders" in the Local Server (SAS 9.3 / EG 4.3)

I don't think that's possible.

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

Solution
‎05-08-2014 10:55 AM
Esteemed Advisor
Posts: 6,661

Re: How do I create "subfolders" in the Local Server (SAS 9.3 / EG 4.3)

SAS libraries are always flat, there can be no hierarchy beyond library.member.

Hierarchies are possible in the "Files" section of the server.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Respected Advisor
Posts: 3,124

Re: How do I create "subfolders" in the Local Server (SAS 9.3 / EG 4.3)

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 717 views
  • 4 likes
  • 4 in conversation