Published on :
ETL CREATION_INTERNE

Creating and Displaying the prob12_8 Table

This code is also available in: Deutsch Español Français
Awaiting validation
The code initializes a table named 'prob12_8' by reading raw data lines directly included in the script. It configures date reading and handles incomplete data lines using the MISSOVER option. Finally, a PRINT procedure displays the data on screen.
Data Analysis

Type : CREATION_INTERNE


Data manually entered via the DATALINES statement.

1 Code Block
DATA STEP Data
Explanation :
DATA step creating the 'prob12_8' table. The 'firstobs=2' option ignores the header line of the datalines, and 'missover' handles records where variables (like SCORE2) are missing at the end of the line without moving to the next line.
Copied!
1DATA prob12_8;
2 INFILE DATALINES firstobs=2 missover;
3 informat ID $3. GENDER $1. DOB mmddyy10.;
4 INPUT ID GENDER DOB SCORE1 SCORE2;
5 FORMAT DOB date9.;
6 
7DATALINES;
8***Header line: ID GENDER DOB SCORE1 SCORE2
9001 M 10/10/1976 100 99
10002 F 01/01/1960 89
11003 M 05/07/2001 90 98
12;
2 Code Block
PROC PRINT
Explanation :
Displays the content of the last created table (prob12_8) in the standard output.
Copied!
1PROC PRINT;
2 title 'Problem 12.8';
3RUN;
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.