So I am using a master file that contains about 6 %include statements calling my bigger sas programs.
Problem is that when I run this master file SAS stops working after the first few programs and just ignores the rest of the file.... no errors are seen in the log either...
How can I fix this problem?
A first possibility I can think of is the SAS hasn't stopped running but is waiting for a quit statement. If so, if you run each of the programs manually in order without using an include statement you may be able to see where it is waiting for an exiting statement.
You might also check the line lengths on the programs. Perhaps SAS is truncating some lines when using %INC that are not truncated when it is the main program.
Can you run them one by one in the same SAS sessions without errors? Perhaps some options, macro variables, librefs , work datasets create by one of the earlier programs is causing the later programs to execute differently than they do if run individually.
I'm with data _null_ that if these are independent programs using SYSTASK would be the right thing to do (and you could even run your programs in parallel).
If you want to stick with %include then below options could help:
options s=0 s2=0 source2;
The first two options set the allowed code line length to the maximum, source2 shows you the code of "includes" in the log which makes debugging easier.
And here examples of how to use systask to start SAS jobs:
There are length limitations for source code documented. What limitations there are depends on your OS and SAS version (what do you have).
For debugging I would first try and figure out which %include is the first one no more working. Then I would run only this %include and see if the problem persists.
If it is a code line length issue: Could you please explain how it comes that your code is all on one line. Could you also explain how you run your code (both separately and via %include statement). Are you using for both the same environment and client?
In case anyone else has this problem, I figured out one potential cause and solution.
In the program that the %include called, I'd commented out the end of my code using "/*". Since it was the end of the program, I'd not closed the block comments with a matching "*/". This was causing the parent program to have subsequent code commented out.
Find more tutorials on the SAS Users YouTube channel.