anyone can help me to understand this:
"a DATA step view is implicitly executed when it is referenced as an input data set by another DATA or PROC step. Its main purpose is to provide data, one record at a time, to the invoking procedure or DATA step"
more informaiton is appreciated!
A full description can be found at: http://support.sas.com/documentation/cdl/en/lrcon/69852/HTML/default/viewer.htm#n07vq6hmss6f67n1vhnn...
When you set a data or include a data step view in any process (data step or proc) all of the statements that were included in the run that created the view are executed.
Art, CEO, AnalystFinder.com
A full description can be found at: http://support.sas.com/documentation/cdl/en/lrcon/69852/HTML/default/viewer.htm#n07vq6hmss6f67n1vhnn...
When you set a data or include a data step view in any process (data step or proc) all of the statements that were included in the run that created the view are executed.
Art, CEO, AnalystFinder.com
Maybe a small concrete example will help a bit.
data work.class/view= work.class; set sashelp.class; run; proc freq data=work.class; tables height; run; proc freq data=work.class; tables sex; run;
If you look at the log you will notice that each of the Proc Freq statements that reference the view created in the datastep references reading SASHELP.CLASS and then WORK.CLASS. Every time WORK.CLASS is used it re-reads SASHELP.CLASS.
An explanation and simple example in the article "What is a DATA step view and why is it important?"
What Can You Do with a DATA Step View?
Using a DATA step view, you can do the following:
directly process any file that can be read with an INPUT statement
read other SAS data sets
generate data without using any external data sources and without creating an intermediate SAS data file
......
My main use for Views involves combining multiple data sets that are updated at different intervals. That way when I use the View I get all of the latest data without having to worry about "am I missing the data that may have been updated yesterday".
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.