f = getdeck(array_nameʃ,override_dim1, override_dim2, override_dim3]ʅ);
The
getdeck function returns the value stored in the
DeckArray hot deck by using the current value(s) of the
value set items that were defined as dimensions in the DeckArray declaration. The function automatically recodes the values and accesses the proper cell in the hot deck. If any of the DeckArray dimensions are not associated with a value set, then you must specify the desired numeric index when calling the function.
If (+) was specified after any of the array_name dimensions, the
"leftover" rows for that dimension will be retrieved whenever an invalid value for that dimension is given.
The function returns the value in the hot deck or DEFAULT in the event that the values supplied are not valid entries in the value sets and thus could not be recoded to a proper cell in the hotdeck. Note that DEFAULT will never be returned if all hot deck dimensions allowed
"leftover" (i.e., they were defined with a (+)).
Array education_HD_SexAge(SEX_VS, AGE_FOR_EDUCATION_HD_VS) save;
// more code ...
PROC EDUCATION
EDUCATION = getdeck (education_HD_SexAge); // use current values for sex and age
EDUCATION = getdeck (education_HD_SexAge, 1); // override sex only
EDUCATION = getdeck (education_HD_SexAge, ,28); // override age only
EDUCATION = getdeck (education_HD_SexAge, 1,28); // override both sex and age