DATA Step, Macro, Functions and more

Proc Contents Vs Proc Datasets

Reply
Occasional Contributor
Posts: 14

Proc Contents Vs Proc Datasets

Hello All,

 

I'm trying to understand the basic difference between PROC CONTENTS and PROC DATASETS, but have no clear idea.

 

Can any one please explain the basic difference between these along with some examples?

 

Appreciate your effort.

 

Thanks.

Super User
Posts: 19,855

Re: Proc Contents Vs Proc Datasets

Posted in reply to arunvaibhav

Proc contents is a subset of proc datasets, but PROC datasets can do more than proc contents, for example modify variable labels or formats. Proc contents can read sequential files, PROC datasets, contents statement cannot. 

 

 

Occasional Contributor
Posts: 14

Re: Proc Contents Vs Proc Datasets

I'm sorry. Can you please provide some more details?

Thanks for the quick response. 

What is a sequential file in this context? Why PROC DATASETS cannot read it?

 

Thanks!

Super User
Super User
Posts: 7,981

Re: Proc Contents Vs Proc Datasets

Posted in reply to arunvaibhav

Yes, this is exactly what the Manual is for:

Proc contents:

https://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#p02vdgvofvi65sn12...

 

Proc datasets:

http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#n0yyy9zscyifkln1i8...

 

Contents lists the dataset metadata (structure).  Datasets does a lot more on top of that.

Ask a Question
Discussion stats
  • 3 replies
  • 278 views
  • 0 likes
  • 3 in conversation