What are you trying to do with this complex equation?
%EVAL(%sysfunc(COUNTC(&liste_tables,' ')) + 1)
Let's break it down. So first it counts how many times either of the two characters space and single quote appear in the macro variable. Then it adds one.
Since you seem to be using it as the upper bound for a %DO loop that processes each item in a list why not just use the COUNTW() function to find out how many items are in the list instead? Also make sure to use the same set of characters as delimiters in both the call to COUNTW() and the call to %SCAN().
%do x = 1 %to %sysfunc(COUNTW(&liste_tables,%str( )));
%let curr_table = %scan(&liste_tables,&x,%str( ));
... View more