subfiles cannot be caused from a submitted (batch) job. they are for interactive jobs only.
if you want to replicate this, you need to set up an array with enough elements to hold the “subfile” records and then print the array elements.
Register Hereor login if you are already a member
DSPJOB OPTION(*OPNF) ...and...