How to get your SAS data set attributes into Excel

This post was kindly contributed by The SAS Dummy - go there to comment and to read the full post.

I’m working on a SAS programming project with a large team. Each team member is responsible for a piece of the overall system, and the “contract” for how it all fits together is The Data. For example, I’ve got a piece that performs some data manipulation and produces several output data sets, and my colleagues Bryan and Cindy will then pick those up as input into their pieces. In order for this puzzle to fit together cleanly, we need to agree on library names, data set names, and the column names, lengths and formats.

So the team members have been flinging PROC CONTENTS output at each other for several weeks, in an effort to make sure that this jigsaw puzzle comes together as it should. However, I know that the team is using a spreadsheet to keep track of all of these data schemas, and so the PROC CONTENTS exercise turns into an exercise of getting the output listing into Excel.

If all you want is a quick Excel-friendly listing of your data columns and their attributes, that’s easy to get from SAS Enterprise Guide. Here’s how:

1. Add the data set to your SAS Enterprise Guide project. (You can accomplish this from File->Open->Data, or drag the data set file onto your process flow.)

2. In the data grid view, select the Properties button from the toolbar. The Properties window appears for your data set.

3. Select the Columns tab, then click the Copy to clipboard button.

4. Paste the result into your Excel spreadsheet.

The result: a listing of your data column attributes, with each attribute in its own column. Easy!

tags: SAS Enterprise Guide, SAS tips

This post was kindly contributed by The SAS Dummy - go there to comment and to read the full post.