BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Panagiotis
SAS Employee

Yeah i'm guessing that's why. No worries, glad you everything is working!

 

 

dgreenberg
Calcite | Level 5

I was having the same problem using the SAS University Edition. When the course directed me to set up the PG1 library it did not require me to specify the data subfolder. Once I went back in and added that it worked like a charm. Thank you for this!

asta1
Calcite | Level 5

im unable to create a library

it is showing 

ERROR: Library PG1 is not in a valid format for access method RANDOM.
ERROR: Error in the LIBNAME statement.;
Cynthia_sas
SAS Super FREQ
Hi:
How are you running your programs: SAS University Edition in a Virtual Machine, SAS OnDemand for Academics or SAS through your work or school license?

Typically, if you have followed the setup instructions, and if you're using SAS Studio, you can right click on the EPG1V2 folder and select Properties and you'll find the correct full path to use in the Location field of the Properties Windows.

Videos for how to do the setup for each method of using SAS can be found here: https://communities.sas.com/t5/SAS-Communities-Library/Creating-Data-for-Programming-1-and-Programmi... Inside the article you'll find a button to get to the EPG1V2 instructions (and if you're taking an earlier version of Programming 1, there is also a button to get to the recordings for the older EPG194 version of the course).

Most useful when posting questions like this is showing us the actual code you submitted and a screen shot of your log message. Saying that you're unable to create a library indicates that you are farther along in the course, past the setup section and in this case, it is also useful to know what Lesson you're working in (Lesson 1, Lesson 2, etc) and what activity or practice within the lesson.
Hope the videos in the article help you figure things out.
Cynthia
jnbaene
Calcite | Level 5

Hello, I have a related question. I am using SAS studio. I logged out and when I began a new session, I recreated the library using my saved libname program. When I run the program, it does create the PG 1 library. However the PG1 library folder  is empty - no tables. I am directing the libname statement to my EPG1V2/Data folder within SAS studio where I do see many tables. Why is the library empty? Here is my syntax: 

libname pg1 "/folders/myfolders/coursefiles/EPG1V2/data";
Cynthia_sas
SAS Super FREQ

Hi:

  This is NOT the path we recommend:

Cynthia_sas_0-1595447275102.png

 

For SAS University Edition, we recommend that you make your EPG1V2 folder directly under the My Folders top node, in which case, the correct path would be:

libname pg1 "/folders/myfolders/EPG1V2/data";

However, the way to find the correct path is to start with the Server Files and Folders pane (not the Libraries pane). Then, in Server Files and Folders,  navigate to the EPG1V2 folder and expand it. Then navigate to the data subfolder. Do you see files inside? Some of the files will have .xlsx, .csv and .dat file extensions. Other files will have .sas7bdat extensions. If you see all of these file types in the data subfolder, then right-click on the data subfolder and choose Properties.

 

  The Properties popup window will have a location field. THAT will be the correct location for you to use in your LIBNAME statement.

 

  When you ran the data setup programs for the class, did you see the PROC CONTENTS results at the end of the successful completion of the programs? If so, the top of the PROC CONTENTS also showed you the correct path to use. You can use your path with "coursefiles" in the name, if that is the actual folder structure you have and the folder structure you used when you created the class files.

 

  If you do NOT see any sas7bdat file extensions in your data folder, that implies that something went wrong with your data creation program. Go back to the course setup instructions and re-run the programs again. Be sure you use the correct folder name for the location of your data for class.

 

  You will ONLY see SAS datasets in the Libraries window AFTER you are successful at running the data creation program in class. Did you watch the videos that were referenced in my earlier posting?

 

Cynthia

 

 

 

dolphen_2020
Calcite | Level 5
Hello, I'm in lesson 3 level 1 practice: exploring data with procedures 

/* list first 20 rows */
proc print data=pg1.np_summary (obs=20);
var Reg Type Park Name DayVistis Tent Campers RVCampers;
run;

when i run this statement

 
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 /* list first 20 rows */
74 proc print data=pg1.np_summary (obs=20);
ERROR: Libref PG1 is not assigned.
75 var Reg Type Park Name DayVistis Tent Campers RVCampers;
76 run;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 216.93k
OS Memory 30116.00k
Timestamp 11/23/2020 04:24:54 AM
Step Count 66 Switch Count 0
Page Faults 0
Page Reclaims 31
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
 
77
78
79 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
can someone help me 


Cynthia_sas
SAS Super FREQ

Hi:
It's not a good idea to add your new post to an older post like this. Many folks won't search through the 2 pages of previous posts to find the new one. It's much better to make a new post and refer to this one if you need to.

The most common reason for getting the LIBREF not assigned message are these:
1) You did not submit a LIBNAME statement for the PG1 library
2) You DID submit a LIBNAME statement, but you pointed to a folder that did not exist or you misspelled one of the folder names
3) You had some issue with making the data for the class (as shown in earlier posts in this thread) and didn't use the right path (as shown in the previous posting where the user inserted a folder named coursefiles into the class folder path.

If you are using SAS University Edition in a Virtual Machine, when you open SAS Studio, the top node in the Server Files and Folders pane will say My Folders and this folder will point to your shared folder location as defined in the Virtual Machine host software. Assuming next, that you followed ALL of the instructions for making the class data, then your correct LIBNAME statement would be something like:
libname PG1 '/folders/myfolders/EPG1V2/data';

Or, if you are using SAS OnDemand for Academics and you start SAS Studio from a browser by going to the OnDemand server and logging into your dashboard, then your top node on the Server Files and Folders pane will say Files (Home). Assuming next, that you followed ALL the instructions for making the class data, then your LIBNAME statement would be something like:
libname PG1 '/home/<userID>/EPG1V2/data';

So if your userID was jjones0 then the statement would be:
libname PG1 '/home/jjones0/EPG1V2/data';

Or if your userID was u1234567 then the statement would be:
libname PG1 '/home/u1234567/EPG1V2/data';

There are other ways of using SAS, such as SAS Enterprise Guide or SAS on a local install on your C: drive. However, without more concrete information about how you are using SAS, the above 2 LIBNAME examples are the ones that we get the most questions about.

Cynthia

dolphen_2020
Calcite | Level 5
Dear Cynthia

I would like to thank you very much for your help and support,it's my first
time to post any question with SASsupport communities.

i have SAS on demand SAS studio, and when i proceed it the statement you
send and using my user ID still did not work, please see below reply when i
run it

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 libname PG1'home/u50254657/EPG1V2/data'
74
75 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
_______
22
ERROR: Libref PG1 is not assigned.
ERROR: Error in the LIBNAME statement.
ERROR 22-7: Invalid option name OPTIONS.
76 ODS HTML CLOSE;
77 &GRAPHTERM; ;*';*";*/;RUN;QUIT;
78 QUIT;RUN;
79 ODS HTML5 (ID=WEB) CLOSE;
80
81 ODS RTF (ID=WEB) CLOSE;
82 ODS PDF (ID=WEB) CLOSE;
NOTE: ODS PDF(WEB) printed no output.
(This sometimes results from failing to place a RUN statement
before the ODS PDF(WEB) CLOSE statement.)
83 FILENAME _GSFNAME;
NOTE: Fileref _GSFNAME has been deassigned.
84 DATA _NULL_;
85 RUN;
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 461.84k
OS Memory 22952.00k
Timestamp 11/30/2020 04:42:37 AM
Step Count 29 Switch Count 0
Page Faults 0
Page Reclaims 24
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 8



brzcol
SAS Employee

Hello,

 

At first glance it seems you are missing the semicolon at the end of your libname statement. 

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!

LIBNAME 101

Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 24 replies
  • 13804 views
  • 11 likes
  • 12 in conversation