I've missed or forgotten part of this discussion, so excuse me if I ask an obvious question.
First of all, what you will replay is not the jpg files. These are files you have printed from a SAS step where the device driver was a JPEG file constructor. On that same step, you should have had the option to also send the output to a graphics catalogue. In fact, if you didn't specify one, they would by default have gone to the WORK.GSEG catalog.
In this location, they are native SAS/Graph objects, and not printed files. It is these that you can copy to other catalogues with catalogue management steps, or use as the input to the Template procedures of SAS/Graph.
Saying "it's not OK", is not sufficient for a discussion forum. You are better off sending a copy of the log entry where your attempt failed. There should be something that complains about the definition for the four treplay statements. It may also complain that the IGOUT catalogue does not exist since this is expected to be the input catalogue for the procedure. Your output catalogue is defined with GOUT.