BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Phil_NZ
Barite | Level 11

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.
Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

@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.

 

screenshot36.JPG

View solution in original post

8 REPLIES 8
mkeintz
PROC Star

Why bother creating a copy of the original data set?  Will the original become inaccessible?

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
Phil_NZ
Barite | Level 11

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. 

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
SASKiwi
PROC Star

@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.

Phil_NZ
Barite | Level 11

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,

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
SASKiwi
PROC Star

@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.

 

screenshot36.JPG

Phil_NZ
Barite | Level 11

Opppps!

 

Thank you @SASKiwi  for this notice, I mainly use SAS EG to code but never use the "Servers" place.

 

Warmest regards.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
SASKiwi
PROC Star

@Phil_NZ  - Then you are missing one of EG's best features 🙂

ChrisNZ
Tourmaline | Level 20

> 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,

ChrisNZ_1-1614552134495.png

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 1005 views
  • 7 likes
  • 4 in conversation