![]() |
PING
0.9
Statistical data handling and processing in production environment
|
Insert variables into a given dataset using the DATA step statemens .
idsn : a dataset reference;var : (option) list of variables to insert in odsn dataset; if empty no variable is inserted;value: (option) list of values that are assigned to each variable;ilib : (option) name of the input library; by default: empty, i.e. WORK is used.odsn : (option) name of the output dataset; by default: empty, i.e. idsn is also used; it will contain the variable/s inserted;olib : (option) name of the output library; by default: empty, i.e. WORK is also used;Let us consider the test dataset #38:
| geo | EQ_INC20 | RB050a |
|---|---|---|
| BE | 10 | 10 |
| MK | 50 | 10 |
| MK | 60 | 10 |
| .. | .. | .. |
and run the following:
to create the output table TMP:
| geo | EQ_INC20 | RB050a | FMT | DIM |
|---|---|---|---|---|
| BE | 10 | 10 | fmt_BE_ | 4 |
| MK | 50 | 50 | fmt_MK_ | 4 |
| MK | 60 | 60 | fmt_MK_ | 4 |
| .. | .. | .. | .. | .. |
Run macro %_example_ds_insert for examples.
In short the macro runs the following DATA STEP statements: