I'm trying to do a do loop with proc sql. The following part of the script gives an error message:
%let totalobs = 100;
%let totalobs = &totalobs. + 1;
ERROR: Open code statement recursion detected.
Does anyone know what the issue is?
Try to restart SAS and rerun
Here is my log:
1840 %let totalobs = 100;
1842 %let totalobs = &totalobs. + 1;
1844 %put totalobs=&totalobs;
totalobs=100 + 1
1849 %let totalobs = 100;
1851 %let totalobs = %eval(&totalobs. + 1);
1853 %put totalobs=&totalobs;
You might get that message if you made the mistake of omitting the first semicolon at the end of the first %LET statement. If that's not the cause, we might need to see the log including the SQL piece.
Need further help from the community? Please ask a new question.