in reply to Printing to file
Try replacing the file name with:
weekly_${store}_pdf.sas [download]
You probably want to add use strict; at the top to catch this type of error.
Phil