Published on :
ETL INTERNAL_CREATION

PG2 Course Data Generation

This code is also available in: Deutsch Español Français
Awaiting validation
This program aims to generate a comprehensive set of test tables used for the 'Programming 2' course (EPG294). It creates various tables (student demographic data, grades, sports equipment sales in Europe) using static data directly embedded in the code via `datalines4`. The tables are stored in the 'PG2' library.
Data Analysis

Type : INTERNAL_CREATION


All data is contained within the source code (DATALINES4 blocks).

1 Code Block
DATA STEP Data
Explanation :
Creation of the CLASS_BIRTHDATE table containing student information (Name, Gender, Age, etc.) with birth dates.
Copied!
1DATA PG2.CLASS_BIRTHDATE;
2 attrib Name LENGTH=$8;
3 /* ... attributs ... */
4 INFILE DATALINES dsd;
5 INPUT Name Gender Age Height Weight Birthdate;
6datalines4;
7/* Données ... */
8;;;;
9RUN;
2 Code Block
DATA STEP Data
Explanation :
Creation of the CLASS_QUIZ table containing the results of 5 quizzes for different students.
Copied!
1DATA PG2.CLASS_QUIZ;
2 attrib Name LENGTH=$7 FORMAT=$CHAR7. informat=$CHAR7.;
3 /* ... notes quiz ... */
4 INFILE DATALINES dsd;
5 INPUT Name:$7. Quiz1 Quiz2 Quiz3 Quiz4 Quiz5;
6datalines4;
7/* Données ... */
8;;;;
9RUN;
3 Code Block
DATA STEP Data
Explanation :
Creation of a voluminous EU_SPORTS table listing imports/exports of sports products by European country and by year.
Copied!
1DATA PG2.EU_SPORTS;
2 attrib Sport_Product LENGTH=$7;
3 attrib Geo_Code LENGTH=$2;
4 attrib Country LENGTH=$37;
5 /* ... */
6 INFILE DATALINES dsd;
7 INPUT Sport_Product Geo_Code Country Year Amt_Import Amt_Export;
8datalines4;
9/* Données massives import/export ... */
10;;;;
11RUN;
4 Code Block
DATA STEP Data
Explanation :
Creation of the CLASS_UPDATE table, probably used for exercises to update existing tables.
Copied!
1DATA PG2.CLASS_UPDATE;
2 /* ... */
3 INFILE DATALINES dsd;
4 INPUT Name Sex Age Height Weight;
5datalines4;
6/* Données ... */
7;;;;
8RUN;
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.
Copyright Info : EPG294 warning in header