Format:
f = getdeck(array-name[,override-dim1,override-dim2,override-dim3]);
Description:
The getdeck function returns the value in the DeckArray hotdeck using the current values in the items identified by the value sets used in the declaration of the DeckArray. The function automatically recodes the values and accesses the proper cell in the hotdeck. If any of the dimensions of the DeckArray are not value set dimensions, you must specify the numeric index when calling the function.
Return value:
The function returns the value in the hotdeck or DEFAULT in the case 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.
Example:
array
education_HD_SexAge(SEX_VS,AGE_FOR_EDUCATION_HD_VS) save;
...
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 value and age
See also: DeckArrays, DeckArray Leftover Rows, Putdeck Function