Hi everyone!
Today I face a basic problem but I do not know how to work on it efficiently.
I have a library named "my", I want to create an output of my.nlsy for checking data purpose (nlsy is a sas7bdat file in this library).
Normally, I will do
libname my'C:\Users\pnguyen\OneDrive - Massey University\SAS\Document\FERMFLDUSAS_data' access=readonly;
data call_nlsy;
set my.nlsy;
run;
But I think it is quite weird because we need to create a data step for such a simple task, and I do not want to use proc print as well. Is there any way to extend the libname statement or else to show the output my.nlsy efficiently?
Warm regards.
Update:
I follow this document to call an output but it does not work. In this document they wrote:
libname saveit 'your-data-library';
data saveit.weight_club;
I also wrote the same thing in my code
libname my 'C:\Users\pnguyen\OneDrive - Massey University\SAS\Document\FERMFLDUSAS_data' access=readonly;
data my.nlsy;
but the log is like that
28 libname my 'C:\Users\pnguyen\OneDrive - Massey University\SAS\Document\FERMFLDUSAS_data' access=readonly;
NOTE: Libref MY refers to the same physical library as ECI00001.
NOTE: Libref MY was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\pnguyen\OneDrive - Massey University\SAS\Document\FERMFLDUSAS_data
29 data my.nlsy;
30
31 %LET _CLIENTTASKLABEL=;
32 %LET _CLIENTPROCESSFLOWNAME=;
33 %LET _CLIENTPROJECTPATH=;
34 %LET _CLIENTPROJECTPATHHOST=;
35 %LET _CLIENTPROJECTNAME=;
36 %LET _SASPROGRAMFILE=;
37 %LET _SASPROGRAMFILEHOST=;
38
39 ;*';*";*/;quit;run;
____
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
ERROR: Write access to member MY.NLSY.DATA is denied.
@Phil_NZ - This is what the Enterprise Guide Servers pane looks like - do you not have it open? It will contain all SAS libraries, and tables, you define with a LIBNAME statement plus your SASUSER and WORK libraries.
Why bother creating a copy of the original data set? Will the original become inaccessible?
Hi @mkeintz ,
This dataset is a physical file in a folder on the computer, I want to show it at the Output Data interface of SAS EG to have a look at it quickly to have a sense.
Thanks.
P/S: I know we can go to the folder and double-click on the file but I want to see if is there any way shorter by using one or two lines of code to solve it.
@Phil_NZ - What's the problem with expanding the MY library in the EG servers pane and opening the dataset there? You may have to refresh the Servers pane if you have just applied the MY LIBNAME.
Hi @SASKiwi
Sorry if I confused you. I am wondering what do you mean by documenting that"expanding the MY library in the EG servers pane and opening the dataset there", I still not get this idea then.
Warm regards,
@Phil_NZ - This is what the Enterprise Guide Servers pane looks like - do you not have it open? It will contain all SAS libraries, and tables, you define with a LIBNAME statement plus your SASUSER and WORK libraries.
Opppps!
Thank you @SASKiwi for this notice, I mainly use SAS EG to code but never use the "Servers" place.
Warmest regards.
@Phil_NZ - Then you are missing one of EG's best features 🙂
> what do you mean by documenting that"expanding the MY library in the EG servers pane
Please watch some of the many videos explaining the basics of the Enterprise Guide interface.
The servers pane is here shown below. Expand it to see the SAS data sets in a given library. Double-click on a data set to see its contents,
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.