If you are only running SAS code, then it would be a whole lot easier to run the program in batch mode with the ERRORABEND option set (Add options errorabend; as the first statement in the rpiogram). No checking for errors is required and a SAS log is produced and the program will stop running when the first error is encountered.
... View more