Published on :
ETL CREATION_INTERNE

Creation of the myLib.smallDataset table

This code is also available in: Deutsch Español Français
Awaiting validation
This script executes a DATA step to create the `myLib.smallDataset` table. It uses a `DO` loop to iterate over a list of specific values (missing, -1, 0, 1) stored in the variable `n`. A second variable `m` is derived by applying the `fmtNum.` format (assumed to exist) to `n`. The resulting table is stored in the `myLib` library.
Data Analysis

Type : CREATION_INTERNE


The data is entirely generated within the script via an iterative loop, without reading from an external source.

1 Code Block
DATA STEP Data
Explanation :
DATA step that initializes the output table `myLib.smallDataset`. It contains an explicit loop to generate 4 observations with test values for the variable `n` and applies a format conversion to create the variable `m`.
Copied!
1DATA myLib.smallDataset;
2 DO n = ., -1, 0, 1;
3 m = put(n, fmtNum.);
4 OUTPUT;
5 END;
6RUN;
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.