BookmarkSubscribeRSS Feed
catkat96
Obsidian | Level 7

I'm at work, and I can't create a new library due to permissions.

I need to transfer one file (sas7bdat format) that's on one folder in my computer to the work library in SAS. Whenever I open it in sas through Open-> Data, it's left on the "process flow" but it's not visible on the Work library. 

 

Is there any way to do this?

6 REPLIES 6
catkat96
Obsidian | Level 7

I'm using enterprise guide 7.15 locally

Edit: actually I'm not sure if it's locally or on a server. It's installed on my PC but I access the team's server to get datasets usually (not this case, clearly) 

Tom
Super User Tom
Super User

I don't use EG but ...

 

If the file is already on the machine where SAS is running.

I am not sure how/why they could prevent you from defining a new libref that points to the folder where SAS lives but you can always reference the file by its actual physical filename.

proc contents data="/some folder/mydataset.sas7bdat"; run;

If the file is on your local machine and not accessible on the machine where SAS is running then I believe there should be a file upload tool in Enterprise Guide.   See if you can use that to place the file into the WORK folder.   You can use %sysfunc(pathname(WORK)) to find the path to where your current session's work folder is located.  Also if your SAS session is running on Unix then make sure you upload the file using a lowercase letters in the filename.  So if you uploaded mydataset.sas7bdat to your work folder you could this code to check it.

proc contents data=work.mydataset; run;
catkat96
Obsidian | Level 7

When I try the first option the error message says "the physical file name is too long". What can I do if the path is long?

 

When I tried the second option, the error mesage was "file work.filename.data not found"

Tom
Super User Tom
Super User

So is your SAS session running on Unix or Windows?  Check the macro variables &SYSSCP and &SYSSCPL.

Make sure you are using paths that reflect how to reference the files on that operating system.

 

If it is running on Windows and the path is too long then that usually means you are referencing a network share.  So the trick to shorten the path is to mount a drive letter to include part of the path and use the driver letter in your references.  But that option is probably not going to be available to you without talking to the administrator of the machine where SAS is running.

 

If SAS says dataset filename does not exist in the WORK directory then that means there is no file named filename.sas7bdat in that directory.  Remember that if SAS is running on Unix then filenames are case sensitive and SAS will only use lowercase letters.  So if the file is actually named with mixed or uppercase letters like Filename.sas7bdat or FILENAME.SAS7BDAT then SAS will not see it as a dataset.

Reeza
Super User
Is there not an upload data task in EG?

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
  • 6 replies
  • 4267 views
  • 0 likes
  • 4 in conversation