Anytime you get
NOTE: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation marks.
you have to look for something unbalanced in the code. Unbalanced quotes, missing closing parentheses, %MACRO without a proper %MEND, and so on.
Note that you do not need to create and execute a macro if you only have simple unnested %IF %THEN %DO. You can run those in "open code" and remove at least part of the complexity, particularly for testing.
What do your include files contain? If there are more macro definitions in there, they might be part if the problem.
Start wit a simplified version of the process (as already suggested) and expand from there until you get a problem; you will then have clear clue where to look.
... View more