%MACRO MMERGE(DEST,SOURCE1,SOURCE2,VAR); %MSORT(&SOURCE1,&VAR); %MSORT(&SOURCE2,&VAR); DATA &DEST; MERGE &SOURCE1 &SOURCE2; BY &VAR; RUN; %MEND MMERGE; %MSORT(CRASH,ACC_NO); %MSORT(UNITS_SORTED,ACC_NO; %MMERGE(IRIS.CRASH_UNITS_S,CRASH,UNITS_SORTED,ACC_NO,IF X=1); Log as follows: 1 The SAS System 15:06 Thursday, November 16, 2017 1 ;*';*";*/;quit;run; 2 OPTIONS PAGENO=MIN; 3 %LET _CLIENTTASKLABEL='Program'; 4 %LET _CLIENTPROJECTPATH=''; 5 %LET _CLIENTPROJECTNAME=''; 6 %LET _SASPROGRAMFILE=; 7 8 ODS _ALL_ CLOSE; 9 OPTIONS DEV=ACTIVEX; 10 GOPTIONS XPIXELS=0 YPIXELS=0; 11 FILENAME EGSR TEMP; 12 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR 13 STYLE=HtmlBlue 14 STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css") 15 NOGTITLE 16 NOGFOOTNOTE 17 GPATH=&sasworklocation 18 ENCODING=UTF8 19 options(rolap="on") 20 ; NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR 21 22 GOPTIONS ACCESSIBLE; 23 %MACRO MMERGE(DEST,SOURCE1,SOURCE2,VAR); 24 %MSORT(&SOURCE1,&VAR); 25 %MSORT(&SOURCE2,&VAR); 26 DATA &DEST; 27 MERGE &SOURCE1 &SOURCE2; 28 BY &VAR; 29 RUN; 30 %MEND MMERGE; 31 32 %MSORT(CRASH,ACC_NO); _ 180 WARNING: Apparent invocation of macro MSORT not resolved. ERROR 180-322: Statement is not valid or it is used out of proper order. WARNING: Apparent invocation of macro MSORT not resolved. 33 %MSORT(UNITS_SORTED,ACC_NO; _ 180 ERROR 180-322: Statement is not valid or it is used out of proper order. ERROR: More positional parameters found than defined. 34 %MMERGE(IRIS.CRASH_UNITS_S,CRASH,UNITS_SORTED,ACC_NO,IF X=1) 35 36 GOPTIONS NOACCESSIBLE; 37 %LET _CLIENTTASKLABEL=; 38 %LET _CLIENTPROJECTPATH=; 39 %LET _CLIENTPROJECTNAME=; 40 %LET _SASPROGRAMFILE=; 41 42 ;*';*";*/;quit;run; 43 ODS _ALL_ CLOSE; 44 2 The SAS System 15:06 Thursday, November 16, 2017 45 46 QUIT; RUN; 47 Is this what you are asking?
... View more