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

Hello,

 

I want to see the variables in a pdb.  here's my code:


libname pdb '/a/b/c/d/e/2017/0501';

proc contents data=pdb;

proc print data=pdb;

 

 

what am i doing wrong here?  please help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

You created a libref that points to a directory and then asked PROC CONTENTS to show you the variables in an unrelated WORK dataset.  If you know the member name of the dataset want then use that in the proc contents statement.

proc contents data=pdb.mydataset; run;

Or if you want to see the contetns for all of the datasets in the library then use the _ALL_ keyword.

proc contents data=pdb._all_; run;

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

We don't know what you are doing wrong, because you haven't explained what happens that you think is wrong. Perhaps you could explain what you see or don't see that is wrong, and why it is wrong.

 

 

--
Paige Miller
prolifious
Obsidian | Level 7

Thank you.

 

in the log, it notes the the libref was successfully assigned, but the error noted under the proc contents says  "file.work.pdb.data does not exist".  do i need a data step?

Tom
Super User Tom
Super User

You created a libref that points to a directory and then asked PROC CONTENTS to show you the variables in an unrelated WORK dataset.  If you know the member name of the dataset want then use that in the proc contents statement.

proc contents data=pdb.mydataset; run;

Or if you want to see the contetns for all of the datasets in the library then use the _ALL_ keyword.

proc contents data=pdb._all_; run;
prolifious
Obsidian | Level 7

Thank you very much, Tom.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3530 views
  • 2 likes
  • 3 in conversation