If I understand you correctly, this is a very simple thing to do. I believe that you want to use symbolics. For example...
//SET FILENAME='THIS.IS.YOUR.ABC.XYZ.FILE'
//S001 EXEC PGM=XXXXX
//INPUT DD DSN=INPUTFILE,DISP=SHR
//OUTPUT DD DSN=&FILENAME,DISP=SHR
// DISP=(,CATLG,DELETE),
// STORCLAS=SCPROD,
// SPACE=(CYL,(177,2777),RLSE),
// DCB=DSORG=PS
//*********************************************
//S002 EXEC PGM=YYYYY
//INPUT DD DSN=&FILENAME,
// DISP=SHR
//OUTPUT DD DSN=OUTPUT.FILE,
// DISP=(,CATLG,DELETE),
// STORCLAS=SCPROD,
// SPACE=(CYL,(177,2777),RLSE),
// DCB=DSORG=PS