%macro rep(in=,param=,critn=,crit=);
proc report data=&in. nowd missing headskip headline split='^' ls=&ls;
column ('--' avisitn avisit ("Treatment A^--^(N=%eval(&N1))^--^Number of Subjects (%)^--" (n1 n2 n3 n4 n5 n6 n7 n8)));
/* define param / order noprint;*/
/* define critn / order noprint;*/
/* define crit / order noprint;*/
define avisitn / order noprint;
define avisit / "Visit " width=20 spacing=0 left flow display id;
define n1/"n" width=4 center spacing=1;
%if &critn.=1 %then %do;
define n2/"High *a" width=14 center spacing=1;
%end;
%if &critn.=2 %then %do;
define n2/"Low *a" width=14 center spacing=1;
%end;
define n3/"Grade 0" width=14 center spacing=1;
define n4/"Grade 1" width=14 center spacing=1;
define n5/"Grade 2" width=15 center spacing=1;
define n6/"Grade 3" width=15 center spacing=1;
define n7/"Grade 4" width=15 center spacing=1;
define n8/"Missing *c" width=15 center spacing=1;
/* break after crit/ page;*/
compute before _page_;
line @1 "¶m.";
line @1 'CTCAE Criterion: ' "&crit.";
endcomp;
compute after _page_ ;
line &ls*'-';
line @1 'Abbreviations: N = number of subjects in population;';
line @1 ' n = number of subjects with data collected (includes missing values) for a specific lab parameter at each timepoint.';
line @1 "The denominator for 'Worst' is the total number of patients who had at least one post-baseline value data point,";
line @1 "with value either missing or non missing.";
line @1 '*a -- <High/Low> category counts the number of subjects for whom the values of the given lab test are abnormally <High/Low>';
line @1 ' and the CTCAE criterion in the table header is defining values that are abnormally <Low/High>;';
line @1 "*c -- the 'missing' category displays the number of subjects who provided only missing data for the given visit.";
line @1 '';
/* line @1 "Data cut-off date: &cutoffdc;";*/
line @1 "Program Location: &curpath\&pgmname..sas";
line @1 "Output Location : %upcase(&outdir)\&outfile..rtf";
line @1 "Data Location : %upcase(&sdtm.)";
line @1 " : %upcase(&adam.)";
endcomp;
run;
%mend;
%macro proc;
%do i=1 %to 67;
%do j=1 %to 2;
data temp1;
set final;
where ord=&i and critn=&j;
call symput('param',param);
call symput('crit',crit);
run;
proc sql noprint;
select count(*) into: nobs from temp1;
quit;
%if &nobs > 0 %then %do;
%rep(in=temp1,param=¶m,critn=&j,crit=&crit);
%end;
%end;
%end;
%mend;
%proc;
I got the error:
NOTE: There were 26 observations read from the data set WORK.FINAL. WHERE (ord=5) and (critn=1); NOTE: The data set WORK.TEMP1 has 26 observations and 25 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
NOTE: PROCEDURE SQL used (Total process time): real time 0.00 seconds cpu time 0.01 seconds
ERROR:: All positional parameters must precede keyword parameters NOTE: Line generated by the invoked macro "PROC". 500 %rep(in=temp1,param=¶m,critn=&j,crit=&crit); _____ 180
ERROR: 180-322: Statement is not valid or it is used out of proper order The SAS System
NOTE: There were 0 observations read from the data set WORK.FINAL. WHERE (ord=5) and (critn=2); NOTE: The data set WORK.TEMP1 has 0 observations and 25 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
In the beginning the error appeared when (ord=17 and critn=1) ans also for (ord=38 and critin=2), but somehow now this appears for ord=5 and critn=1. I did not change anything.
anyone knows about this error?
Thanks
... View more