Learning SAS? Welcome to the exclusive online community for all SAS learners.

SAS Statement to connect data folder on Mac via Shared Folder on VM to SAS University Edition?

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

SAS Statement to connect data folder on Mac via Shared Folder on VM to SAS University Edition?

Hello,

 

I going through the SAS Base Prog training with SAS at the moment and have some training folders on my mac, I've installed SAS Studio via University Edition and Oracle VM and set up shared folder pointing it to my mac folder, but the following code was provided my the SAS Tutor to create the data tables and I can't figure out the correct path back to my data on the mac? Can anyone enlighten me?

 

/* Windows/UNIX */

/* STEP 1: Notice the default values for the %LET statements. */

/* STEP 2: If your files are not to be located in S:/workshop */
/* change the value of PATH= in the %LET statement to */
/* reflect your data location. */

/* STEP 3: Submit the program to create the course data files. */

/* STEP 4: View the Results and verify the CONTENTS procedure */
/* report lists the names of the SAS data sets that were created.*/


%let path=s:/workshop;

/*+++++++++++++++++++++++++++++++++++++++++++++*/
/* Alternate Data Locations */
/* DO NOT CHANGE THE FOLLOWING CODE UNLESS */
/* DIRECTED TO DO SO BY YOUR INSTRUCTOR. */
/*+++++++++++++++++++++++++++++++++++++++++++++*/


*%let path=s:/workshop/pg1;
*%let path=c:/workshop/pg1;
*%let path=c:/SAS_Education/pg1;
*%let path=c:/SAS_Education/lwpg1;


/*+++++++++++++++++++++++++++++++++++++++++++++*/
/* WARNING: DO NOT ALTER CODE BELOW THIS LINE */
/* UNLESS DIRECTED TO DO SO BY YOUR INSTURCTOR.*/
/*+++++++++++++++++++++++++++++++++++++++++++++*/

/*%include "&path/setup.sas";


/* Z/OS */

/*+++++++++++++++++++++++++++++++++++++++++*/
/* For Z/OS Comment out the three statements below.*/
/* Uncomment the following statements for Z/OS and */
/* follow the steps in comments above to set up */
/* the Z/OS data environment. */
/* Recommended SAS DATA library location: prefix.workshop.sasdata */
/* The setup process will use SASDATA as the third level */

%let path=.folders/myfolders/pg1/sasdata;

/*+++++++++++++++++++++++++++++++++++++++++++++*/
/* WARNING: DO NOT ALTER CODE BELOW THIS LINE */
/*++++++++++++++++++++++++++++++++++++++++++++*/

/*%include "&path..sascode(setup)";

  


Accepted Solutions
Solution
3 weeks ago
SAS Super FREQ
Posts: 8,743

Re: SAS Statement to connect data folder on Mac via Shared Folder on VM to SAS University Edition?

[ Edited ]

Hi:
The instructions you have posted are the instructions for the students who are working with the Course notes that we use in Class.

In the Programming 1 classroom class, we recommend that you run the CRE8DATA.SAS program, but you MUST change the %LET statement to have the correct location.

As @ChrisBrooks recommended, when using the University Edition, the "top" part of your path will ALWAYS be /folders/myfolders (your illustration shows a '.' -- that is incorrect.

Further, you should NOT need a subfolder called "sasdata" under your PG1 folder, unless that is what you made.

Typically, in SAS Studio in the UE, you can right click on your folder in the Files and Folders pane and then choose properties and whatever string you see in the LOCATION field on the popup window is the location you use in the %LET statement. The screen shot below shows what the path looks like when you select Properties. Once you know about the /folders/myfolders piece, it is easy to figure out the rest of the path names.

 

  Note that for CRE8DATA.SAS to work as intended, ALL the programs from your zip file need to be unzipped to the SAME folder location. It is our intent for you to unzip the programs to the SAME folder where you intend to write the data. We did not design the program to use a subfolder for the data. So if you make

/folders/myfolders/pg1, then all the programs from the zip file should be in that location and this is the location you should use in the %LET statement. If you make a folder structure like

/folders/myfolders/pg1/sasdata, then ALL the programs need to be unzipped to that folder and the data files for class will be written there.

cynthia

 

what_path_on_ue.png

View solution in original post


All Replies
Regular Contributor
Posts: 187

Re: SAS Statement to connect data folder on Mac via Shared Folder on VM to SAS University Edition?

Try it with the path variable being /folders/myfolders/pg1/sasdata

 

Solution
3 weeks ago
SAS Super FREQ
Posts: 8,743

Re: SAS Statement to connect data folder on Mac via Shared Folder on VM to SAS University Edition?

[ Edited ]

Hi:
The instructions you have posted are the instructions for the students who are working with the Course notes that we use in Class.

In the Programming 1 classroom class, we recommend that you run the CRE8DATA.SAS program, but you MUST change the %LET statement to have the correct location.

As @ChrisBrooks recommended, when using the University Edition, the "top" part of your path will ALWAYS be /folders/myfolders (your illustration shows a '.' -- that is incorrect.

Further, you should NOT need a subfolder called "sasdata" under your PG1 folder, unless that is what you made.

Typically, in SAS Studio in the UE, you can right click on your folder in the Files and Folders pane and then choose properties and whatever string you see in the LOCATION field on the popup window is the location you use in the %LET statement. The screen shot below shows what the path looks like when you select Properties. Once you know about the /folders/myfolders piece, it is easy to figure out the rest of the path names.

 

  Note that for CRE8DATA.SAS to work as intended, ALL the programs from your zip file need to be unzipped to the SAME folder location. It is our intent for you to unzip the programs to the SAME folder where you intend to write the data. We did not design the program to use a subfolder for the data. So if you make

/folders/myfolders/pg1, then all the programs from the zip file should be in that location and this is the location you should use in the %LET statement. If you make a folder structure like

/folders/myfolders/pg1/sasdata, then ALL the programs need to be unzipped to that folder and the data files for class will be written there.

cynthia

 

what_path_on_ue.png

New Contributor
Posts: 2

Re: SAS Statement to connect data folder on Mac via Shared Folder on VM to SAS University Edition?

It worked Cynthia Smiley Happy 

 

Thanks ever so much!

 

 

Thanks ever so much!

☑ This topic is SOLVED.

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

Discussion stats
  • 3 replies
  • 258 views
  • 0 likes
  • 3 in conversation