PING
0.9
Statistical data handling and processing in production environment
|
Create a dataset/table from a common label template and a list of additional labels using a PROC SQL
.
idsn
: (option) dataset storing the template of common dimensions; this table shall contain, for each variable to be inserted in the output dataset, its type, length as well as its desired position; it is of the form: variable | type | length | order |
---|---|---|---|
W | num | 8 | 1 |
idsn
is not set and no template table will be used;var
: (option) dimensions, i.e. names of the (additional) fields/variables present in the dataset; default: empty;type
: (option) types of the (additional) fields; must be the same length as var
;len
: (option) lengths of the (additional) fields; must be the same length as var
;idrop
: (option) variable(s) from the input template dataset idsn
to be dropped prior to their insertion into odsn
;ilib
: (option) name of the library where the configuration file is stored; default to the value &G_PING_LIBCFG
(e.g., LIBCFG
) when not set.odsn
: name of the final output dataset created;olib
: (option) name of the output library where dsn
shall be stored; by default: empty, i.e. WORK
is used.Running for instance
creates the table odsn
as:
A | B | C |
---|---|---|
where all fields A, B, C
are of type CHAR
and length 15. Consider now the following table TEMP
stored in the WORK
ing library:
VARIABLE | TYPE | LENGTH | ORDER |
---|---|---|---|
W | num | 8 | 1 |
X | num | 8 | 2 |
Y | char | 15 | 3 |
Z | num | 8 | -1 |
which impose to put the dimensions W, X, Y
in the first three positions in the table, and Z
in the last position, then run the command:
In output, the table odsn
now looks like:
W | X | Y | A | B | C | Z |
---|---|---|---|---|---|---|
where the variables W, X, Y, Z
types and lengths are taken from the TEMP
table.
Run macro %_example_ds_create
for examples.
The dataset generated using the macro %meta_indicator_contents provides a typical example of configuration table dataset.