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

Can someone explain accessing, using, creating libraries to a COMPLETE newbie?  The demo and materials in the virtual setting are quite confusing and I am finding it difficult to ascertain whether what the speaker is addressing is a 'statement' a 'data step' a 'proc statement' and/or whether what the speaker is discussing is the name of a library or a step.  I successfully completed the steps to complete the activities in lessons 1 and 2 (after much distress) and now, in lesson 3, I am STILL receiving; 


1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 proc print data=pg1.storm_summary(obs=50);
ERROR: Libref PG1 is not assigned.
74

however, my log states:

NOTE: Libref PGL was successfully assigned as follows:
Engine: V9
Physical Name: S:\workshop\EPG1V2\activities

 

my code is:

libname PGL "S:\workshop\EPG1V2\activities";

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  And, in addition to the excellent explanation provided by @ballardw, it looks like you are using the Virtual Lab for the Programming 1 class. The good thing about the Virtual Lab inside the course is that the data is already made for you. The problem with the code that you show is that we have .SAS starter programs in the activities and practices and demos folders under the EPG1V2 main folder. However, the data for class is in the data subfolder. So in order to establish a pointer (or LIBREF or library reference) to the class data for Programming 1, you need to issue a LIBNAME statement in the Virtual Lab like this:

libname pg1 'S:\workshop\EPG1V2\data';  <--- note the pg1 (number 1) 

  If you use the libname statement such as you show, where you point to the activities subfolder, you'll receive a different error message when you run your program because the class data will NOT be found in the activities folder.

Cynthia

View solution in original post

3 REPLIES 3
ballardw
Super User

Please carefully read that error again. Spelling counts. See highlights below.

 


@Pardo wrote:

Can someone explain accessing, using, creating libraries to a COMPLETE newbie?  The demo and materials in the virtual setting are quite confusing and I am finding it difficult to ascertain whether what the speaker is addressing is a 'statement' a 'data step' a 'proc statement' and/or whether what the speaker is discussing is the name of a library or a step.  I successfully completed the steps to complete the activities in lessons 1 and 2 (after much distress) and now, in lesson 3, I am STILL receiving; 


1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 proc print data=pg1.storm_summary(obs=50);
ERROR: Libref PG1 is not assigned.
74

however, my log states:

NOTE: Libref PGL was successfully assigned as follows:
Engine: V9
Physical Name: S:\workshop\EPG1V2\activities

 

my code is:

libname PGL "S:\workshop\EPG1V2\activities";

 

 

 

 


 

Cynthia_sas
SAS Super FREQ

Hi:

  And, in addition to the excellent explanation provided by @ballardw, it looks like you are using the Virtual Lab for the Programming 1 class. The good thing about the Virtual Lab inside the course is that the data is already made for you. The problem with the code that you show is that we have .SAS starter programs in the activities and practices and demos folders under the EPG1V2 main folder. However, the data for class is in the data subfolder. So in order to establish a pointer (or LIBREF or library reference) to the class data for Programming 1, you need to issue a LIBNAME statement in the Virtual Lab like this:

libname pg1 'S:\workshop\EPG1V2\data';  <--- note the pg1 (number 1) 

  If you use the libname statement such as you show, where you point to the activities subfolder, you'll receive a different error message when you run your program because the class data will NOT be found in the activities folder.

Cynthia

Pardo
Calcite | Level 5
Thank you both.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

5 Steps to Your First Analytics Project Using SAS

For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 375 views
  • 0 likes
  • 3 in conversation