You can use code like the following to match the height and weight data to the Children's Recode (KR) file:
* Open Height and weight data file.
GET FILE='ZWHW51FL.SAV'.
* Sort the file.
SORT CASES BY HWHHID, HWLINE.
* Save the sorted data file.
SAVE OUTFILE='ZWHW51FL.SAV'.
* Open Child's recode data.
GET FILE='ZWKR51FL.SAV'.
* Create matching ID variables.
STRING HWHHID (A12).
COMPUTE HWHHID = SUBSTR(CASEID, 1, 12).
* Sort the data file on the matching fields.
SORT CASES BY HWHHID, B16.
* Match the HW file to the KR file.
MATCH FILES /FILE=*
/TABLE='ZWHW51FL.SAV'
/RENAME HWLINE=B16
/BY HWHHID, B16.
Note that this code works when you are matching height and weight data collected at the household level with the children's recode (KR) file. There are two other variations that exist - matching height and weight data collected at the household level with the children's data in the Person's Recode (PR) file; and matching data collected at the individual level with the children's recode (KR) file (used in the earlier DHS surveys). These other variations require somewhat different approaches. The document merge.doc that is distributed with the HW data files describes each approach.