03-01-2012 05:48 AM
hope that i can finally find an explanation for the weird processing in my macro.
I'm executing some SAS codes externally, which do some highly complex calculations and reporting, etc.. If this external file finishes without any errors, then everything is fine and working. But as soon as an Error occures, the main code executing this external files starts acting really weird, e.g existing and populated datasets return zero rows..
Below is a sample describing the processing:
%do loop (here i execute several sasfiles in a row)
select count(1) into :var1 from dataset; --> Here i receive the notification, that no rows were selected?? This happens only if the included sasfile is finished with errors...
Appriciate your help!
03-01-2012 08:02 AM
I think that you would have to provide more of your code for anyone to "see" what you are doing wrong. Without that, one can only guess. My first guess, given the sketchy pseudo code that you provided, is that you are defaulting the assignments of filename and dir in your main macro, and the defaulted files aren't applicable when an error occurs during the process.