This should work basically the same in batch as it does online. Unfortunately, none of my current systems use sdsf (at least not my teams access), so i can't create an example. Bummer.
Suggest you work thru the mechanics online and then replicate those commands into your batch job. You should need a PRINT ODSN that specifies a datasaet, a selection of the file you want to "print", the PRINT command, and a PRINT CLOSE to complete.