New to Sas and trying to complete online training.
The e-learning shows the steps to create a library called PG1, PG1 successfully created:
Hi:
You should NOT have quotes after data= option. It should just be:
proc print data=pg1.np_summary (obs=20);
... more code...
run;
When you use a 2 level SAS name, you do NOT need quotes. The LIBNAME statement already points to the operating system folder path for the data. So, SAS knows to look for the np_summary.sas7bdat file in that location when you use the 2 level name. If you remember, back in the early part of class, we had you use the fully qualified path for the storm_summary data, like this:
proc contents data="/home/<yourUserID>/EPG194/data/storm_summary.sas7bdat" ;
run;
With a LIBNAME statement defined,
libname pg1 '/home/<yourUserID>/EPG194/data';
you can use the "nickname" or libref of PG1 to tell SAS where the SAS data is located in a folder on the operating system. SAS knows that SAS tables have a file extension of sas7bdat, so you can simplify the DATA= option with an UNQUOTED 2 level name, as shown below:
proc contents data=pg1.storm_summary ;
run;
OR
proc contents data=pg1.np_summary ;
run;
OR
proc print data=pg1.np_summary ;
run;
Hope this helps,
Cynthia
Hi:
You should NOT have quotes after data= option. It should just be:
proc print data=pg1.np_summary (obs=20);
... more code...
run;
When you use a 2 level SAS name, you do NOT need quotes. The LIBNAME statement already points to the operating system folder path for the data. So, SAS knows to look for the np_summary.sas7bdat file in that location when you use the 2 level name. If you remember, back in the early part of class, we had you use the fully qualified path for the storm_summary data, like this:
proc contents data="/home/<yourUserID>/EPG194/data/storm_summary.sas7bdat" ;
run;
With a LIBNAME statement defined,
libname pg1 '/home/<yourUserID>/EPG194/data';
you can use the "nickname" or libref of PG1 to tell SAS where the SAS data is located in a folder on the operating system. SAS knows that SAS tables have a file extension of sas7bdat, so you can simplify the DATA= option with an UNQUOTED 2 level name, as shown below:
proc contents data=pg1.storm_summary ;
run;
OR
proc contents data=pg1.np_summary ;
run;
OR
proc print data=pg1.np_summary ;
run;
Hope this helps,
Cynthia
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.