In reply to Simon Ouellet.

Simon, to save space I trimmed out your program log. The issue you're having is that when running SAS 9.1.3, you can't rely on the open-ended range for SELECT INTO -- that's a 9.3 feature (as commented in the code). You'll need to add a SELECT COUNT step to calculate the upper range of the number of titles. That technique is covered in this blog post.