Published on :
ETL MIXTE

Displaying SASHELP Data and Local Creation

This code is also available in: Deutsch Español Français
Awaiting validation
The code begins by listing the content of the SASHELP.FISH system table. Then, it defines a local library 'edulib', creates a table 'mtcars' with hardcoded data (CARDS) in it, and displays the result.
Data Analysis

Type : MIXTE


Data from the SASHELP system library and manually entered data (CARDS) in the Data Step.

1 Code Block
PROC PRINT
Explanation :
Displays the data from the SASHELP.fish table on the screen.
Copied!
1PROC PRINT DATA=SASHELP.fish;
2RUN;
2 Code Block
DATA STEP Data
Explanation :
Defines the 'edulib' library pointing to a local folder, then creates the 'edulib.mtcars' table by loading raw data included in the code.
Copied!
1LIBNAME edulib "/folders/myfolders/";
2DATA edulib.mtcars;
3INPUT cars$ mpg cyl hp;
4CARDS;
5Mercedes_AMG 21 6 160
6BMW_X1_AUTO 22.1 4 180
7;
8RUN;
3 Code Block
PROC PRINT
Explanation :
Verifies data creation by displaying the content of the 'edulib.mtcars' table.
Copied!
1PROC PRINT DATA=edulib.mtcars;
2RUN;
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.