Format:
f = putdeck(array-name,numeric-expression[,override-dim1,override-dim2,override-dim3]);
Description:
The putdeck function updates 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, where it places the value of the numeric-expression. If any of the dimensions of the DeckArray are not value set dimensions, you must specify the numeric index when calling the function.
If a (+) is specified after the array-name, the "leftover" rows for the hotdeck will also be updated with the value. See the leftover rows page for more information.
Return value:
The function returns 1 if successful 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
putdeck(education_HD_SexAge,EDUCATION);
// use current values for sex and age
putdeck(education_HD_SexAge,EDUCATION,1); // override
sex only
putdeck(education_HD_SexAge,EDUCATION,,28); // override
age only
putdeck(education_HD_SexAge,EDUCATION,1,28); // override
both value and age
See also: DeckArrays, DeckArray Leftover Rows, Getdeck Function