PING
0.9
Statistical data handling and processing in production environment
|
Return information regarding a given variable in a dataset, e.g. the type of the variable, its (in)format, its length, ...
dsn
: a dataset reference;var
: a field name whose information is provided;lib
: (option) output library; default (not passed or ' '): lib
is set to WORK
._typ_, _lab_, _fmt_, _infmt_, _len_, _pos_
: names of the macro variables used to store the output information about the variable in the dataset, respectively the type, the label, the format, the informat, the length and the position of the variable.
Let us consider the table _dstest30
:
geo | value |
---|---|
BE | 0 |
AT | 0.1 |
BG | 0.2 |
'' | 0.3 |
FR | 0.4 |
IT | 0.5 |
then if we want to retrieve information about the variable geo
, we use for instance:
which returns pos=1, type=C, len=2, vfmt=BEST12
.
Run macro %_example_var_info
for more examples.
%var_check, %var_compare, %var_rename, %ds_order, %var_count, VARNUM, VARTYPE, VARLABEL, VARFMT, VARLEN, VARINFMT, VFORMAT,