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

Hello,

I'm having a problem where my Mac is saving data as a document instead of SAS file. This is making me have problems when importing my documents to my library. The documents are available in my folders but not my library even when trying to import to a new library. I'm using Google Chrome. Has anyone had this issue before?

1 ACCEPTED SOLUTION
8 REPLIES 8
tom_grant
SAS Super FREQ
Sorry you are having this problem - can you attach a screenshot? I am assuming you are using SAS Studio on SAS OnDemand for Academics, correct??
zoebaccam
Calcite | Level 5

Hi. I feel like I got it partially worked out, but every time I upload my dataset to SAS Studio, it reads as 0 observations despite not showing any errors in importing. How do I fix this? Attaching a screenshot of my code.

Screen Shot 2022-03-01 at 7.36.30 PM.png

Tom
Super User Tom
Super User

Your picture does not show any SAS datasets.

The filename for a SAS dataset must be in all lowercase on Unix. 

Rename the file to us the right case and then it will be visible to SAS.

 

When you try to reference a dataset named either haiti.hTIr71Fl or haiti.HTIR71FL SAS is going to look for a file named htir71fl.sas7bdat.  Since Unix file systems are case sensitive there is no file with that name.  

 

You should have the same trouble on you MAC since it is also using a Unix filesytem.  If you create a file name FRED.TXT and then try to open a file named fred.txt it will not find it.

zoebaccam
Calcite | Level 5

Okay I renamed the file and tried the libname function again, but my dataset has 0 observations despite being in my library now. Is there a fix to this?

 

Thank you!

 

Screen Shot 2022-03-01 at 9.18.35 PM.pngScreen Shot 2022-03-01 at 9.18.44 PM.png

Tom
Super User Tom
Super User

Your screenshots still look confusing.  Now instead of showing the FILES you appear to have switched to showing DATSETS in librefs.  So on the left you appear to be showing a dataset with member name of DATA in a libref named HAITI.  Also another libref named HAITIDAT.  You then try to reference a dataset named HAITIDAT in the libref  HAITI.  But I don't see any such dataset in that libref in the images on the left.

 

What did you name the file?

What directory is the file in?
What directory is the HAITI libref pointing at?  Run this code to check the dataset in the HAITI libref.

proc contents data=haiti._all_; run;

What directory is the libref HAITIDAT pointing at?  Run a similar PROC CONTENTS step for that libref also.

zoebaccam
Calcite | Level 5

I'm also very confused lol. I have just consolidated it down to the HAITI library in My Libraries. 

 

When I run the code below, I get the screenshotted output

libname Haiti "/home/u49642626/Haiti";
data haiti;
set haiti.haitidata;
run;

proc contents data=haiti._all_;
run;Screen Shot 2022-03-01 at 10.08.41 PM.png
zoebaccam
Calcite | Level 5
Wow... thank you so much. I was so confused!

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!

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