Programming 1 and 2

For questions related to SAS programming courses and case studies
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
shigemuraJun
Calcite | Level 5

• My interface is SAS studio.

 

While I was doing the first activity of Lesson4 and checking my code along with its hiden answer. A doubt arise to me as follows. 

 

• To create a permanent table with LIBNAME statement, why do we need to pass in Path argument like "path-to-EPG1V2/output" as recommended below since I guess that a new table is not stored in the output folder but in my libraries? 

 

• The path argument should be abandoned empty enclosed with double quotations, shoudn't it? 

 

== quote ==

Note: To create storm_cat5 as a permanent table in the EPG1V2/output folder, you would simply submit a LIBNAME statement to define a library and then reference the library on the DATA statement as in:

libname out "path-to-EPG1V2/output";
data out.storm_cat5;
. . .
run;

 == Unquote==

sass22.png

sass11.png

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

A library is a theoretical concept, it is a shortcut to the file path you've indicated.

If you were on a Windows computer you could navigate to that file path and see the SASfiles as SAS7bdat files.
You can do it in SAS On Demand as well, go to the Servers Files and Folders pane and navigate to that location and see the same SAS files as in the library.

 

The path argument should be abandoned empty enclosed with double quotations, shoudn't it? 


No, the library is a simplification that makes it easier to reference files without having to list the full file path each time but you have to declare it at least once, which is what the LIBNAME statement does. If you set it up as Automount or put it in your Autoexec file it is loaded automatically but the code is somewere (autoexec file).


@shigemuraJun wrote:

• My interface is SAS studio.

 

While I was doing the first activity of Lesson4 and checking my code along with its hiden answer. A doubt arise to me as follows. 

 

• To create a permanent table with LIBNAME statement, why do we need to pass in Path argument like "path-to-EPG1V2/output" as recommended below since I guess that a new table is not stored in the output folder but in my libraries? 

 

• The path argument should be abandoned empty enclosed with double quotations, shoudn't it? 

 

 

 

== quote ==

Note: To create storm_cat5 as a permanent table in the EPG1V2/output folder, you would simply submit a LIBNAME statement to define a library and then reference the library on the DATA statement as in:

libname out "path-to-EPG1V2/output";
data out.storm_cat5;
. . .
run;

 == Unquote==

 


 

View solution in original post

2 REPLIES 2
shigemuraJun
Calcite | Level 5

• My interface is SAS studio.

 

While I was doing the first activity of Lesson4 and checking my code along with its hiden answer. A doubt arise to me as follows. 

 

• To create a permanent table with LIBNAME statement, why do we need to pass in Path argument like "path-to-EPG1V2/output" as recommended below since I guess that a new table is not stored in the output folder but in my libraries? 

 

• The path argument should be abandoned empty enclosed with double quotations, shoudn't it? 

 

 

 

== quote ==

Note: To create storm_cat5 as a permanent table in the EPG1V2/output folder, you would simply submit a LIBNAME statement to define a library and then reference the library on the DATA statement as in:

libname out "path-to-EPG1V2/output";
data out.storm_cat5;
. . .
run;

 == Unquote==

 

Reeza
Super User

A library is a theoretical concept, it is a shortcut to the file path you've indicated.

If you were on a Windows computer you could navigate to that file path and see the SASfiles as SAS7bdat files.
You can do it in SAS On Demand as well, go to the Servers Files and Folders pane and navigate to that location and see the same SAS files as in the library.

 

The path argument should be abandoned empty enclosed with double quotations, shoudn't it? 


No, the library is a simplification that makes it easier to reference files without having to list the full file path each time but you have to declare it at least once, which is what the LIBNAME statement does. If you set it up as Automount or put it in your Autoexec file it is loaded automatically but the code is somewere (autoexec file).


@shigemuraJun wrote:

• My interface is SAS studio.

 

While I was doing the first activity of Lesson4 and checking my code along with its hiden answer. A doubt arise to me as follows. 

 

• To create a permanent table with LIBNAME statement, why do we need to pass in Path argument like "path-to-EPG1V2/output" as recommended below since I guess that a new table is not stored in the output folder but in my libraries? 

 

• The path argument should be abandoned empty enclosed with double quotations, shoudn't it? 

 

 

 

== quote ==

Note: To create storm_cat5 as a permanent table in the EPG1V2/output folder, you would simply submit a LIBNAME statement to define a library and then reference the library on the DATA statement as in:

libname out "path-to-EPG1V2/output";
data out.storm_cat5;
. . .
run;

 == Unquote==

 


 

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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
  • 2 replies
  • 1438 views
  • 1 like
  • 2 in conversation