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.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
  • 3 replies
  • 1319 views
  • 0 likes
  • 3 in conversation