/* Creates a long version of the HILDA files, up to version = &version. Uses macros HILDARenameStripFirst and HILDALoop. Variable names =20 that do not start with X have the first letter stripped. Variables = WaveN and WaveL are also created.=20 WaveN =3D 1, 2, 3 etc and WaveL =3D A, B, C etc. If text 'underscore' is included as third parameter, the renamed = variables have underscores as first =20 character. NB if using with wave 9, you might need to modify to = include length statements=20 (or use the HILDALength8 macro). Example usage: data hhlong; %HILDALong(10,hilda.household,underscore); keep _hhrhid WaveN WaveL [other variables]; run; */ set %HildaLoop(&version,%nrstr( &file._&WaveL=20 = (rename=3D(%HILDARenameStripFirst(&file._&WaveL,&underscore))= =20 in=3Din&WaveL) ) ); if 0 then ; %HildaLoop(&version,%nrstr(=20 else if in&WaveL then do; WaveN =3D &WaveN; WaveL =3D "&WaveL"; end; )); %mend HILDALong;