Assuming you are running the job by yourself and not using something like CA7 to run the job, you will have to “RESTART” at the job step that creates the temp data set. Because once the original job terminated the temp data set is gone, you will have to recreate it. On the job card you use the “RESTART=STEP?” job card parameter. You would restart in step4 because that’s the step that created the temp data set.
//JOBNAM01 JOB(12345),’JOB DESCRIPT’,MSGCLASS=X,CLASS=B,