i have two datasets. 1. dum1 2. all_freqs data dum1;length btoxgr $7.; btoxgr='Grade 0'; output; btoxgr='Grade 1'; output; btoxgr='Grade 2'; output; btoxgr='Grade 3'; output; btoxgr='Grade 4'; output; btoxgr='T_Btoxg'; output; run; data all_freqs; PARCAT3='HAEMATOLOGY';btoxgr='Grade0';TRT01A='LZA';PARAMCD='GRAN';cnt=12;output; PARCAT3='HAEMATOLOGY';btoxgr='Grade2';TRT01A='LZA';PARAMCD='GRAN';cnt=20;output; PARCAT3='HAEMATOLOGY';btoxgr='Grade1';TRT01A='LZA';PARAMCD='LYMP';cnt=19;output; PARCAT3='HAEMATOLOGY';btoxgr='Grade2';TRT01A='LZA';PARAMCD='KKSP';cnt=90;output; PARCAT3='LIVER AND KIDNEY';btoxgr='Grade0';TRT01A='LZA';PARAMCD='PLAT';cnt=12;output; PARCAT3='LIVER AND KIDNEY';btoxgr='Grade2';TRT01A='LZA';PARAMCD='WBC';cnt=22;output; PARCAT3='LIVER AND KIDNEY';btoxgr='Grade1';TRT01A='LZA';PARAMCD='WBC';cnt=24;output; PARCAT3='LIVER AND KIDNEY';btoxgr='Grade3';TRT01A='LZA';PARAMCD='AST';cnt=11;output; run; I would need a dataset that can take all the rows of all_freqs merged with dum1 in all possible combination i.e. in all_freqs dataset under 1 parmcd we have btoxgr='Grade0' present only, in that case all other grades must be coming for the same paramcd with values 0 in cnt variable. tried using the below code, but nor working. data dummy; merge all_freqs(KEEP=parcat3 param paramcd trt01an trt01a btoxgr IN=A) dum1(in=b); */ BY BTOXGR;if a or b; RUN; any help?
... View more