The add method adds entries, and the replace method removes but also adds entries. Maybe this program helps a little: * Copy-Paste-Problem ..; ** : is equal to ":", sorry, this never happened before ; Data A; Length N $1.; Do N='A','B','C'; Do X=1 To 5; Output; End; End; Run; Data _NULL_; Length N $1. X 8; Declare Hash H (Dataset:'A',Multidata:'y'); H.Definekey('N'); H.Definedata(All:'y'); H.Definedone(); * This is what add does; N='X';X=8; rc=H.Add(Key:N,Data:N,Data:X); H.Output(Dataset:'B'); * This is what replace does; N='B';X=9; rc=H.Replace(Key:N,Data:N,Data:X); H.Output(Dataset:'C'); Run;
... View more