Wednesday, October 18, 2006

Using SAS DATA Step Views to Conserve Data Storage Space

A SAS data view is a type of SAS data set that retrieves data values from other files. A SAS data view only contains descriptor information such as the data types and lengths of the variables, plus information that is required for retrieving data values from other SAS data sets or from files that are stored in other software vendors' file formats.

SAS data views are of member type VIEW.

In most cases, you can use a SAS data view as though it were a SAS data file. Example 1 shows how to create a view:

Example 1:

data sasuser.at_risk / view=sasuser.at_risk;
set work.students;
where at_risk = '1';

The VIEW= option tells SAS to compile (but not execute) the source program and to store the compiled code in the input DATA step view.

You can use a DESCRIBE statement in a DATA step to write a copy of the source code for a data set view to the SAS log:

Example 2:
data view=sasuser.at_risk;

The log from this data step will show the source code used to create the view.

SAS Data View Benefits
You can save disk space by storing a view definition, which stores only the instructions for where to find the data and how it is formatted, not the actual data.

Views can ensure that the input data sets are always current because data is derived from views at execution time.

Since views can select data from many sources, once a view is created, it can provide prepackaged information without the need for additional programming.

Views can reduce the impact of data design changes on users. For example, you can change a query that is stored in a view without changing the characteristics of the view's result.
With SAS/CONNECT software, a view can join SAS data sets that reside on different host computers, presenting you with an integrated view of distributed data.
You can use views as input to other DATA steps or PROC steps and in combination with other data sources using PROC SQL.

When to Use SAS Data Views
Consider the following in order to determine whether a SAS data file or a SAS data view is better for your purposes:
Data files use additional disk space; data views use additional processing time.
Data file variables can be sorted and indexed prior to use; data views must process data in its existing form during execution.

To learn more about creating and using data views, click here.


At 4:10 AM, Anonymous Anonymous said...

Thanks very much for showing how to describe the definition of a SAS view - most helpful.

At 10:01 AM, Anonymous Anonymous said...

really helpful ..thanks....!

At 12:10 AM, Blogger Melisa said...

Thanks for sharing this valuable post to my knowledge great pleasure to be here SAS has great scope in IT industry. It’s an application suite that can change, manage & retrieve data from the variety of origin & perform statistical analytic on it
sas training in Chennai

At 3:01 AM, Blogger Roshini RS said...

The information you have given here is truly helpful to me. CCNA- It’s a certification program based on routing & switching for starting level network engineers that helps improve your investment in knowledge of networking & increase the value of employer’s network
ccna training in Chennai|ccna training chennai|ccna training institutes in Chennai

At 10:31 PM, Blogger jhansi joe said...

Quite Interesting post!!! Thanks for posting such a useful post. I wish to read your upcoming blog to enhance my skill set, keep blogging.
Informatica training in chennai|Best Informatica Training In Chennai|sas training in Chennai

At 4:44 AM, Blogger Roshini RS said...

Thanks Admin for sharing such a useful post, I hope it’s useful to many individuals for developing their skill to get good career.
SAP training in chennai|SAP Course in Chennai|sap training in Chennai

At 5:01 AM, Blogger Amirtha rao said...

Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.

cognos Training in Chennai|cognos Training Chennai|cognos Training

At 4:14 AM, Blogger wdmtest said...

Sas Programming
Reading Raw Data Separated by Spaces
Reading Data Values Separated by Commas or Other Delimiters
Applying an INFORM AT Statement to List Input
Reading Character Values That Contain Blanks
Reading Data Arranged in Columns
Reading Column Data That Require Informats
Reading Two Lines (Records) per Observation
Reading Parts of Your Data More Than Once FEATURES: @ point control

At 2:14 AM, Blogger deeksha said...

I got more information about the sas and i need more information which is useful and informative thanks for sharing this information.

informatica training in chennai

At 2:14 AM, Blogger kanchana said...

Your blog is awesome..You have clearly explained about it ...Its very useful for me to know about new things..Keep on blogging..
CCNA training in chennai

At 4:52 AM, Blogger Nikshitha S said...

Updating with the latest technology and implementing it is the only way to survive in our niche. Thanks for making me this article. You have done a great job by sharing this content in here. Keep writing article like this.
SAS Training in Chennai | SAS Course in Chennai

At 3:26 AM, Blogger Nikshitha S said...

Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
salesforce training in chennai | salesforce training institute in chennai

At 6:59 AM, Blogger Priya Sethuraman said...

When the DATA step views are referenced in the SET statements of the subsequent DATA step executions, DEPARTMENT records are read from the CA-IDMS database and selected record data values are placed in two SAS data sets.

Base SAS training in Chennai

Datawarehousing training in Chennai

Informatica training in Chennai

Hadoop training in Chennai

MSBI training in Chennai

At 2:58 AM, Blogger kingrani said...

Top Consulting Firms in American Samoa
best Consultancies in Arizona
job Consultants in Florida

At 2:28 AM, Blogger Techtoolsinnovation said...

Thank you so much for sharing such an awesome blog...
sas training & job placement
sas job placement


Post a Comment

<< Home