In reply to David Birch.

Hi David,
Thank for your comment. I agree with you that the FILEVAR= option has an advantage in those cases where we don’t know the number of files being created, and that is where a data-driven approach is totally appropriate. However, I dare to say that “data-driven” is not always the best method. For the use case I describe in this blog post, where an external file is split based on the record type and where output files are known in advance, I prefer not to use a data-driven implementation for better code clarity and readability. I have also not seen any written material on the usage of multiple FILE statements in a SAS data step and wanted to shed light on this method in this post.