This program is working and i m able to copy the job logs into a separate dataset. But here i need to specify before hand the 'I' value i.e from which job to which job i need to copy the jcl logs.
My requirement is to submit a pds containing jcls. So dynamically i need to fetch the joblogs of these recently submitted jcls through rexx. So could anyone provide be a better solution so that i dont need to specify 'I' value everytime, when i submit jobs.