How can I create variable and data file "notes" like in Stata?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 16
Accepted Solution

How can I create variable and data file "notes" like in Stata?

One of the things I absolutely love about Stata is the ability to easily add notes and time stamps each time I create or modify a variable or data file. This creates metadata that travel with the variable or data file so that it's really easy to see the history of each item even if it gets separated from my own workflow (e.g., shared with colleagues).

I've looked into proc datasets a little, but I can't see how to add notes to a variable. And I haven't found any good entry-level overviews of proc datasets in general. Are there any recommendations for such resources?

Here's a link to information on how Stata handles it.

Data Management in Stata

See section 2.3.2 for variable notes

Here's Stata's documentation.  It seems like it's a general function that works on both data files and variables.

http://www.stata.com/manuals13/dnotes.pdf

Thanks in advance and happy holidays!


Accepted Solutions
Solution
‎11-25-2014 03:29 PM
Trusted Advisor
Posts: 3,213

Re: How can I create variable and data file "notes" like in Stata?

You did not tell anything of your SAS environment.

- Using SAS with a Metadataserver you can register all kind of information in that to variables/datasets (notes) SAS(R) Data Integration Studio 4.7: User's Guide

  The metadata is about describing the data. Major itme of an ETL process. 

- Dataset labels and variable labels you must have found. new (9.4) is that you can set you own kind of properties.

  Base SAS(R) 9.4 Procedures Guide, Third Edition (Xattr)

- Using Eguide there are notes in you flows 10 tips for organizing your SAS Enterprise Guide projects - The SAS Dummy

- wanting to follow the changes in a dataset, put an audit-trail on it SAS(R) 9.2 Language Reference: Concepts, Second Edition

Choose the one as you need.

SAS has many options and normally there is not single best approach for all. 

---->-- ja karman --<-----

View solution in original post


All Replies
Solution
‎11-25-2014 03:29 PM
Trusted Advisor
Posts: 3,213

Re: How can I create variable and data file "notes" like in Stata?

You did not tell anything of your SAS environment.

- Using SAS with a Metadataserver you can register all kind of information in that to variables/datasets (notes) SAS(R) Data Integration Studio 4.7: User's Guide

  The metadata is about describing the data. Major itme of an ETL process. 

- Dataset labels and variable labels you must have found. new (9.4) is that you can set you own kind of properties.

  Base SAS(R) 9.4 Procedures Guide, Third Edition (Xattr)

- Using Eguide there are notes in you flows 10 tips for organizing your SAS Enterprise Guide projects - The SAS Dummy

- wanting to follow the changes in a dataset, put an audit-trail on it SAS(R) 9.2 Language Reference: Concepts, Second Edition

Choose the one as you need.

SAS has many options and normally there is not single best approach for all. 

---->-- ja karman --<-----
Occasional Contributor
Posts: 16

Re: How can I create variable and data file "notes" like in Stata?

Yes, sorry...

I'm in SAS 9.3 on Windows (7 on some machines and XP on another). I don't use Enterprise Guide (don't have it installed on my work machines).

Sounds like dataset and variable labels are new in 9.4. I'm getting an upgrade soon, I think, so that's good to know!

I don't know Metadataserver at all.

Thanks for the quick response.

Super User
Posts: 7,782

Re: How can I create variable and data file "notes" like in Stata?

So you don't have a centralized server, just a bunch of disconnected desktop PCs with each having their individual installation setup and datasets?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 16

Re: How can I create variable and data file "notes" like in Stata?

Posted in reply to KurtBremser

Well, we have file servers, but I don't know how SAS is managed. I'm not on the IT end. On my laptop it's definitely a single install, setup.

Trusted Advisor
Posts: 3,213

Re: How can I create variable and data file "notes" like in Stata?

The dataset and variable labels are as old as SAS. That is old as seen in the V5 version or even before. At that dataset structure changes of the data and code could be included automatic.
By the way that is some 30 years ago. What is new are those xattr functions, adding complete new documentational or functional options in a design you can do on your own.  

---->-- ja karman --<-----
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 517 views
  • 4 likes
  • 3 in conversation