Data is directly embedded in the SAS script via the `cards;` statement within a DATA STEP, making it internal and self-contained.
1 Code Block
DATA STEP Data
Explanation : This DATA STEP block is used to create a temporary SAS dataset named `instream_mtcars`. Variables `cars`, `mpg`, `cyl`, `disp`, `hp`, and `drat` are defined, and data is read directly from the lines following the `cards;` statement. `informat cars$12.;` specifies that the `cars` variable is a character of length 12.
Explanation : This block uses PROC PRINT to display the entire content of the previously created `instream_mtcars` dataset. It is a simple procedure to visualize the data in the output window.
Copied!
proc print data=instream_mtcars;
run;
1
PROC PRINTDATA=instream_mtcars;
2
RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.