![]() |
PING
0.9
Statistical data handling and processing in production environment
|
Replace some old values of (personal or household) variables with new ones for a given list of countries and given conditions.
geo
: list of (blank separated) countries ISO-codes; note that when geo=_ALL_
, all countries will be processed, i.e. no condition on ISO-code will be imposed;iudb
: input temporary UDB table;var
: (option) variable to replace .
; if empty, nothing is done (i.e., masking is skipped);vartype
: (option) type of variables passed, either personal (P
), household (H
) register (R
) or (D
); if empty (not recommended), the first letter of the first variable in var
will be used in place of vartype
;new
: (option) new replacement value; if both new
and expr
(see below) are emtpy, the macro will replace the observations with old values (defined using the old
or where
arguments below) for var
with this new
value; incompatible with expr
;where
: (option) additional WHERE
clause used to further refine the conditions applied to select the values (observations) to be replaced;expr
: (option) replacement expression; it will be used to formulate the new values for var
; incompatible with expr
;old
: (option) list of old values to be replaced; if both old
and where
are emtpy, the macro will replace missing values for var
; this is equivalent to passing where=quote(&var = &old)
;lib
: (option) input library; default: lib=WORK
.Update the table iudb
by replacing any/all of the variables that are passed to var
.
Let us consider the variable DB040
where 'FI20' values need to be replaced with 'FI1B' in UDB_D1
for FI:
This is actually operating the following:
Note that one could also have ran the equivalent instructions: