Hello and welcome to the forum,
I can't understand the below code in a JCL.
And yet you did not post the actual jcl. . .
What was posted is not jcl, but is input data to some program.
If the expanded jcl had been posted, the pgm= would have been available.