Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

How to display derived variables in a SAS Visual Analytics custom graph

Reply
Occasional Contributor
Posts: 9

How to display derived variables in a SAS Visual Analytics custom graph

I am working with code that starts with some data, does some processing and changes variable names, does some processing that combines information from variables in more than one dataset, changes some of the variable names, brings in other data and changes names to variables, and on and on...

 

There's hundreds if not a thousand variables.  I'd like to create something that shows the entire flow where you can look for a variable name in one dataset and see where it came from and where it's going.

 

Does anybody know where I can start?  I haven't been using SAS EG in a while but I'm wondering if the code were in SAS EG if there was a feature in there that would help?  

 

I'm using SAS 9.4 for Windows.  I have a bit of experience with EG, it's just been a while but I think I could move what I have over to it if need be.

SAS Employee
Posts: 17

Re: How to display derived variables in a SAS Visual Analytics custom graph

Hello Stacey!

 

One quick way to get a lot of information on a sas dataset (and more importantly the columns within the data) is to use PROC CONTENTS.

 

Most programmers know they can use proc contents to get information about the columns in a single SAS dataset.  Here's an example of using the sashelp.class data.

proc contents data=sashelp.class; run;

 

However PROC CONTENTS can also be run against an entire library; returning information about all datasets, and all columns within the datasets.  Here's an example using the sashelp library:

 

proc contents data=sashelp._ALL_ out=work.datainfo; run;

 

The _ALL_ option makes the procedure read all sas datasets in the library.

The out= option writes the information out to a sas dataset (work.datainfo) for future use.

 

You might consider using the work.datainfo data as the source for your visualization. 

 

- Mike Drutar

Ask a Question
Discussion stats
  • 1 reply
  • 238 views
  • 0 likes
  • 2 in conversation