%str did not help, same error
program:
DATA countries;
INPUT country $ population;
CARDS;
France 75
Germany 85
Romania 22
Austria 10
Italy 60
;
RUN;
%macro prog1(var1=);
proc sql;
select sum(population) from countries where country in (&var1.);
quit;
%mend;
data NULL;
set sasuser.ir_input_sheet12;
call execute(catt('%prog1(var1=',var1,');'));
run;
table sasuser.ir_input_sheet12 looks like this
log is the following:
1 Das SAS System 13:16 Saturday, July 17, 2021
1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='Programm';
4 %LET _CLIENTPROCESSFLOWNAME='Standalone Not In Project';
5 %LET _CLIENTPROJECTPATH='';
6 %LET _CLIENTPROJECTPATHHOST='';
7 %LET _CLIENTPROJECTNAME='';
8 %LET _SASPROGRAMFILE='';
9 %LET _SASPROGRAMFILEHOST='';
10
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=SVG;
13 GOPTIONS XPIXELS=0 YPIXELS=0;
14 %macro HTML5AccessibleGraphSupported;
15 %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) >= 0 %then ACCESSIBLE_GRAPH;
16 %mend;
17 FILENAME EGHTML TEMP;
18 ODS HTML5(ID=EGHTML) FILE=EGHTML
19 OPTIONS(BITMAP_MODE='INLINE')
20 %HTML5AccessibleGraphSupported
21 ENCODING='utf-8'
22 STYLE=HtmlBlue
23 NOGTITLE
24 NOGFOOTNOTE
25 GPATH=&sasworklocation
26 ;
NOTE: Writing HTML5(EGHTML) Body file: EGHTML
27
28 DATA countries;
29 INPUT country $ population;
30 CARDS;
NOTE: The data set WORK.COUNTRIES has 5 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.03 seconds
36 ;
37 RUN;
38
39 %macro prog1(var1=);
40 proc sql;
41 select sum(population) from countries where country in (&var1.);
42 quit;
43 %mend;
44
45 data NULL;
46 set sasuser.ir_input_sheet12;
47 call execute(catt('%prog1(var1=',var1,');'));
48 run;
ERROR: All positional parameters must precede keyword parameters.
ERROR: All positional parameters must precede keyword parameters.
ERROR: All positional parameters must precede keyword parameters.
NOTE: The SAS System stopped processing this step because of errors.
2 Das SAS System 13:16 Saturday, July 17, 2021
NOTE: There were 3 observations read from the data set SASUSER.IR_INPUT_SHEET12.
WARNING: The data set WORK.NULL may be incomplete. When this step was stopped there were 3 observations and 6 variables.
WARNING: Datei WORK.NULL wurde nicht ersetzt, da da dieser Schritt angehalten wurde.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
NOTE: CALL EXECUTE generated line.
1 +;
2 +;
3 +;
49
50 %LET _CLIENTTASKLABEL=;
51 %LET _CLIENTPROCESSFLOWNAME=;
52 %LET _CLIENTPROJECTPATH=;
53 %LET _CLIENTPROJECTPATHHOST=;
54 %LET _CLIENTPROJECTNAME=;
55 %LET _SASPROGRAMFILE=;
56 %LET _SASPROGRAMFILEHOST=;
57
58 ;*';*";*/;quit;run;
59 ODS _ALL_ CLOSE;
60
61
62 QUIT; RUN;
63
... View more