![]() |
PING
0.9
Statistical data handling and processing in production environment
|
Insert into a (possibly already existing) dataset a variable passed as an unformatted (i.e., unquoted and blank-separated) list of values.
varlst : unformatted (i.e., unquoted and blank-separated) list of strings;var : name of the variable to use in the dataset;fmt : (option) string used to specify the format of the variable, as accepted by ATTRIB, e.g. something like $10. for a CHAR variable; by default, fmt is not set, the variable will be stored as a CHAR variable;sep : (option) character/string separator in output list; default: %quote( ), i.e. sep is blank.dsn : output dataset; if the dataset already exists, then observations with missing values everywhere except for the variable &var (possibly not present in dsn) will be appended to the dataset;lib : (option) output library; default (not passed or ' '): lib is set to WORK.The following instructions:
return in WORK.dsn the following table:
| Obs | geo |
|---|---|
| 1 | DE |
| 2 | UK |
| 3 | SE |
| 4 | IT |
| 5 | PL |
| 6 | AT |
Run macro %_example_list_to_var for more examples.
If the dataset already exists and there is either no numeric, or no character variables in it, then the following warning will be issued:
WARNING: Defining an array with zero elements.
This message is not an error.