Data is hardcoded in the script via the CARDS statement.
1 Code Block
DATA STEP Data
Explanation : Creation of the 'instream_mtcars' table with metadata definition (informat/format) and raw data loading.
Copied!
/*Code for basic SAS exceution*/
* This is our first SAS code;
data instream_mtcars;
informat cars$12.;
input cars$ mpg cyl disp hp drat;/*Variable*/
/*Observation*/
format cars$6. drat 4.3;
cards;
Mercedes_AMG 21 6 160 110 3.1167
BMW_X1_AUT0 22.8 4 108 93 3.85
;
run;
1
/*Code for basic SAS exceution*/
2
* This is our first SAS code;
3
DATA instream_mtcars;
4
informat cars$12.;
5
INPUT cars$ mpg cyl disp hp drat;/*Variable*/
6
/*Observation*/
7
FORMAT cars$6. drat 4.3;
8
CARDS;
9
Mercedes_AMG 2161601103.1167
10
BMW_X1_AUT0 22.84108933.85
11
;
12
RUN;
2 Code Block
PROC PRINT
Explanation : Simple display of the content of the 'instream_mtcars' dataset.
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.