BookmarkSubscribeRSS Feed
76aaa
Calcite | Level 5
I don't know what I'm doing wrong!! I keep getting libname libref not assigned. Someone, please help!!
14 REPLIES 14
Kurt_Bremser
Super User

Whenever something goes wrong (or doesn't give the expected result), post the log of the whole step(s) that give you problems. Copy/paste the log into a window opened with the {i} button.

SASKiwi
PROC Star

The LIBNAME error suggests the path you have in the statement isn't correct. Please note this path has to be accessible from your SAS Application server with the user name you are running your SAS program under.

76aaa
Calcite | Level 5

I've got to the properties and the lib name is showing the correct pathname but it isn't functioning.

SASKiwi
PROC Star

Run the LIBNAME statement by itself then post the SAS log. Do this by copy and paste, not screenshots as @Kurt_Bremser has recommended.

76aaa
Calcite | Level 5
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 libname mylib "/home/u39853316/My Documents/New";
ERROR: The path /home/u39853316/My Documents/New is not in the list of accessible paths when SAS is in the lockdown state.
ERROR: Error in the LIBNAME statement.
74 run;
75
76 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
88
Kurt_Bremser
Super User

Are you using University Edition in a virtual machine?

The path in

WARNING: Physical file does not exist, /folders/myfolders/AFTER_MIDTERM/output/MIDTERM_Second/nhanes_1.csv.

suggests this.

If yes, make sure that the file is there, and that you spelled the filename right (UE is case sensitive).

Also, if using UE in a VM, you can't have a libname like

/home/u39853316/My Documents/New

That path simply does not exist in the virtual machine.

76aaa
Calcite | Level 5

I'm using SAS Studio.

76aaa
Calcite | Level 5
 
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 /* Generated Code (IMPORT) */
74 /* Source File: nhanes_1.csv */
75 /* Source Path: /folders/myfolders/AFTER_MIDTERM/output/MIDTERM_Second */
76 /* Code generated on: 12/8/19, 12:53 PM */
77
78 %web_drop_table(PG2.IMPORT);
79 FILENAME REFFILE '/folders/myfolders/AFTER_MIDTERM/output/MIDTERM_Second/nhanes_1.csv';
80 run;
81 PROC CONTENTS DATA=WORK.IMPORT; RUN;
ERROR: File WORK.IMPORT.DATA does not exist.
 
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.
 
 
82 PROC IMPORT DATAFILE=REFFILE
83 DBMS=CSV
84 OUT=WORK.IMPORT;
85 GETNAMES=YES;
86 RUN;
 
NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to
WORK.PARMS.PARMS.SLIST.
WARNING: Physical file does not exist, /folders/myfolders/AFTER_MIDTERM/output/MIDTERM_Second/nhanes_1.csv.
ERROR: Import unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.06 seconds
cpu time 0.05 seconds
 
87
 
 
88 data nhanes1;
89 set mylib.nhanes;
ERROR: Libref MYLIB is not assigned.
90 keep SEQN RIAGENDR RIDAGEYR RIDRETH1 DMQMILIT DMDBORN DMDCITZN DMDYRSUS DMDEDUC2 DMDMARTL
91 INDHHINC WTMEC2YR SDMVPSU SDMVSTRA SDDSRVYR INDFMPIR BMXWT BMXHT BMXBMI HSD010 DBQ720--DBQ890;
92 run;
 
WARNING: The variable SEQN in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable RIAGENDR in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable RIDAGEYR in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable RIDRETH1 in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable DMQMILIT in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable DMDBORN in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable DMDCITZN in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable DMDYRSUS in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable DMDEDUC2 in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable DMDMARTL in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable INDHHINC in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable WTMEC2YR in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable SDMVPSU in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable SDMVSTRA in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable SDDSRVYR in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable INDFMPIR in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable BMXWT in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable BMXHT in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable BMXBMI in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: The variable HSD010 in the DROP, KEEP, or RENAME list has never been referenced.
WARNING: Starting variable DBQ720 and ending variable DBQ890 of double-dash list do not exist.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.NHANES1 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.00 seconds
cpu time 0.00 seconds
 
 
93 /*Deleting Missing Observations*/
94 /* Example of if-then statement */
95 data nhanes2;
96 set nhanes1;
97 if nmiss( of _numeric_ ) then delete ;
_____
71
ERROR 71-185: The NMISS function call does not have enough arguments.
 
98 run;
 
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.NHANES2 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.00 seconds
cpu time 0.01 seconds
 
 
99
100 proc sort data=nhanes2 out=nhanes_1 nodup nodupkey;
101 by SEQN;
ERROR: Variable SEQN not found.
102 run;
 
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.NHANES_1 may be incomplete. When this step was stopped there were 0 observations and 0 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
 
103
 
 
104 proc export data=nhanes_1 outfile="folders/myfolders/New/nhanes_1.csv" dbms=csv replace;
105 run;
 
NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to
WORK.PARMS.PARMS.SLIST.
NOTE: No variables in data set WORK.NHANES_1.
ERROR: Export unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.08 seconds
cpu time 0.05 seconds
 
106
 
 
107 proc copy in=work out=mylib;
108 select nhanes_1;
109 run;
 
ERROR: Libref MYLIB is not assigned.
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE COPY 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.
110
 
 
111 proc means data=mylib.nhanes_1 mean min max;
ERROR: Libref MYLIB is not assigned.
112 var RIDAGEYR DMDYRSUS INDHHINC INDFMPIR WTMEC2YR SDMVPSU SDMVSTRA BMXWT BMXHT BMXBMI;
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
113 run;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
114
 
 
115 proc freq data=mylib.nhanes_1;
ERROR: Libref MYLIB is not assigned.
116 tables RIAGENDR RIDRETH1 DMQMILIT DMDBORN DMDCITZN DMDEDUC2 DMDMARTL HSD010 DBQ720--DBQ890;
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
117 run;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
 
118
119 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
131
 
Kurt_Bremser
Super User

@76aaa wrote:

I've got to the properties and the lib name is showing the correct pathname but it isn't functioning.


The fact that it does not work tells you that the path is NOT correct. SAS is always right in this regard.

Reeza
Super User

Show a screenshot of the properties path and your libname path erroring out. 
Remember the properties must be from the Servers Files and Folders area not your OS. 


@76aaa wrote:
I don't know what I'm doing wrong!! I keep getting libname libref not assigned. Someone, please help!!

 

76aaa
Calcite | Level 5
Touché!!
Reeza
Super User
Is your question answered? If so, please mark the solution or post the solution and close this thread. Thanks!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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