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

Trying to upload a database on my hard drive onto SAS university

Reply
Occasional Contributor
Posts: 15

Trying to upload a database on my hard drive onto SAS university

Hello,

I recently installed SAS university and virtualbox on my MAC. I am trying to upload a file i have in my shared folder but keep getting an error:

ERROR: Physical file does not exist, /folders/myfolders/fev.sas7bdat.

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.FEVDATA may be incomplete. When this step was stopped there were 0 observations and 0 variables.

WARNING: Data set WORK.FEVDATA was not replaced because this step was stopped.

NOTE: DATA statement used (Total process time):

  real time 0.01 seconds

  cpu time 0.02 seconds

  

46 proc contents data=fevdata;

47 run;

NOTE: PROCEDURE CONTENTS used (Total process time):

  real time 0.17 seconds

  cpu time 0.19 seconds

  

NOTE: The PROCEDURE CONTENTS printed page 2.

48 ;

49 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

59 ;

I looked at other people's code and tried using libname and infile to import the database (.sas7bdat) but it is not working. The virtual box says my OS is Linux. My code is :

data fevdata;

INFILE '/folders/myfolders/fev.sas7bdat' dlm='!';

run;

proc contents data=fevdata;

run;

Could you please help?

Thank you.

Super User
Posts: 19,861

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to akramaiya

You have some misconceptions, you use infile for CSV/TXT files and you SET sas files, or .sas7bdat files directly. 

It should be something like:

libname mydata '/folders/myfolders/';

data fevdata;

set mydata.fevdata;

run;

proc contents data=fevdata; run;

Occasional Contributor
Posts: 15

Re: Trying to upload a database on my hard drive onto SAS university

Dear Reeza,

Thank you for your reply, when i am following your code:

/*Use FEV data and explore*/;

libname mydata '/folders/myfolders/';

data fevdata;

set mydata.fevdata;

run;

proc contents data=fevdata;

run;

i get the following error:

  OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 libname mydata '/folders/myfolders/';

NOTE: Libref MYDATA was successfully assigned as follows:

  Engine: V9

  Physical Name: /folders/myfolders

44 data fevdata;

45 set mydata.fevdata;

ERROR: File MYDATA.FEVDATA.DATA does not exist.

46 run;

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.FEVDATA may be incomplete. When this step was stopped there were 0 observations and 0 variables.

WARNING: Data set WORK.FEVDATA was not replaced because this step was stopped.

NOTE: DATA statement used (Total process time):

  real time 0.01 seconds

  cpu time 0.02 seconds

  

47 proc contents data=fevdata;

48 run;

NOTE: PROCEDURE CONTENTS used (Total process time):

  real time 0.16 seconds

  cpu time 0.18 seconds

  

NOTE: The PROCEDURE CONTENTS printed page 11.

49 ;

50 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

60 ;

My original file name is just fev.sas7bdat

Super User
Posts: 7,854

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to akramaiya

fev.sas7bdat in the directory that is referenced by the libname has to be accessed as mydata.fev (not fevdata)

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 15

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to KurtBremser

But my fev is in myfolder not my data. I am attaching the print screen i am sorry. I am very new to SAS and not able to understand why this is not working. The error is also attached

Screen Shot 2014-10-03 at 8.00.36 AM.png

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 libname mydata '/folders/myfolders/';

NOTE: Libref MYDATA was successfully assigned as follows:

  Engine: V9

  Physical Name: /folders/myfolders

44 data fev;

45 set mydata.fev;

ERROR: File MYDATA.FEV.DATA does not exist.

46 run;

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.FEV may be incomplete. When this step was stopped there were 0 observations and 0 variables.

NOTE: DATA statement used (Total process time):

  real time 0.01 seconds

  cpu time 0.01 seconds

  

47 proc contents data=fevdata;

ERROR: File WORK.FEVDATA.DATA does not exist.

48 run;

NOTE: Statements not processed because of errors noted above.

NOTE: PROCEDURE CONTENTS used (Total process time):

  real time 0.00 seconds

  cpu time 0.01 seconds

  

NOTE: The SAS System stopped processing this step because of errors.

49 ;

50 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

60 ;

Super User
Posts: 7,854

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to akramaiya

Try the following:

filename oscmd pipe 'ls /folders/myfolders';

data _null_;

infile oscmd;

input;

put _infile_;

run;

This will give you the directory listing in the SAS log.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 15

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to KurtBremser

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 filename oscmd pipe 'ls /folders/myfolders';

ERROR: Insufficient authorization to access PIPE.

ERROR: Error in the FILENAME statement.

44 data fev;

45 infile oscmd;

46 input;

47 put _infile_;

48 run;

ERROR: No logical assign for filename OSCMD.

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.FEV may be incomplete. When this step was stopped there were 0 observations and 0 variables.

WARNING: Data set WORK.FEV was not replaced because this step was stopped.

NOTE: DATA statement used (Total process time):

  real time 0.01 seconds

  cpu time 0.02 seconds

  

49 ;

50 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

60 ;

Super User
Posts: 7,854

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to akramaiya

OK, now at least I know that SAS U has the noxcmd option set Smiley Sad

Where did you put your fev.sas7bdat in the first place? And is this the path that you mapped to myfolders when setting up the VM?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 15

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to KurtBremser

My fev.sas7bdat file is in my folders and saved in my shared folder. Do i need to transfer it to the library? If so what is the path/code to move this dtb from myfolders to library?

Screen Shot 2014-10-03 at 8.57.07 AM.png

Occasional Contributor
Posts: 15

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to akramaiya

Tried this as well:

/*Use FEV data and explore*/;

libname mydata 'folders/myfolders/';

data fev;

set mydata.fev;

run;

proc contents data=mydata.fev;

run;

But got the error:

PTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 /*Use FEV data and explore*/;

44 libname mydata 'folders/myfolders/';

NOTE: Library MYDATA does not exist.

45 data fev;

46 set mydata.fev;

ERROR: File MYDATA.FEV.DATA does not exist.

47 run;

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.FEV may be incomplete. When this step was stopped there were 0 observations and 0 variables.

WARNING: Data set WORK.FEV was not replaced because this step was stopped.

NOTE: DATA statement used (Total process time):

  real time 0.00 seconds

  cpu time 0.01 seconds

  

48 proc contents data=mydata.fev;

ERROR: File MYDATA.FEV.DATA does not exist.

49 run;

NOTE: Statements not processed because of errors noted above.

NOTE: PROCEDURE CONTENTS used (Total process time):

  real time 0.00 seconds

  cpu time 0.00 seconds

  

NOTE: The SAS System stopped processing this step because of errors.

50 ;

51 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

61 ;

Super User
Posts: 7,854

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to akramaiya

I think I have a clue; go to C:\SASUniversityEdition\myfolders in Windows an rename FEV.sas7bdat to fev.sas7bdat.

Then set your libname as /folders/myfolders and try again.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 19,861

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to akramaiya

Again, 1 step at a time.

Your library was not successfully defined. in your post on October 3, 6 am. 

43 libname mydata '/folders/myfolders/';

NOTE: Libref MYDATA was successfully assigned as follows:

Literally run one line at a time. First assign the library. When that's successful navigate to it in the libraries pane at the left hand side and you'll see your data set. Then try the next step.

Trusted Advisor
Posts: 3,215

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to akramaiya

Kurt I have seen and investigate the UE of SAS. It is Linux but in my opinion far too closed it is going onto the personal machine and you can not see anything on the personal Linux machine. Akramaya is jusin a MAC with a look a-like naming as the Linux, that is very confusing.

The dataset should be place at the library Linux is seeing (myfolders) and that is another one as the MAC is seeing (myfolders).

There should be somewhere that path with UE in it and a myfolders. I know it is somewhere in the other UE posts. It happens more often.
  

---->-- ja karman --<-----
Super User
Posts: 7,854

Re: Trying to upload a database on my hard drive onto SAS university

Oh, missed the MAC. Then the path in MacOS will of course look differently.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 15

Re: Trying to upload a database on my hard drive onto SAS university

Posted in reply to KurtBremser

Yes, I have a mac.

Tried your code but got the error:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 /*Use FEV data and explore*/;

44 libname mydata 'folders/myfolders/fev';

NOTE: Library MYDATA does not exist.

45 data fev;

46 set mydata.fev;

ERROR: File MYDATA.FEV.DATA does not exist.

47 run;

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.FEV may be incomplete. When this step was stopped there were 0 observations and 0 variables.

WARNING: Data set WORK.FEV was not replaced because this step was stopped.

NOTE: DATA statement used (Total process time):

  real time 0.01 seconds

  cpu time 0.02 seconds

  

48 proc contents data=mydata.fev;

ERROR: File MYDATA.FEV.DATA does not exist.

49 run;

NOTE: Statements not processed because of errors noted above.

NOTE: PROCEDURE CONTENTS used (Total process time):

  real time 0.00 seconds

  cpu time 0.02 seconds

  

NOTE: The SAS System stopped processing this step because of errors.

50 

51 ;

52 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

62 ;

Ask a Question
Discussion stats
  • 21 replies
  • 1011 views
  • 0 likes
  • 4 in conversation