Read Steve's post somewhere and tried below but it ends up with bad return code (RC=12)
//*
// SET FILENAME='XXXXX.XXXXX.XXXX.XXXX.XXXX.D0218'
//STEVE002 EXEC PGM=IKJEFT01,PARM='DEL ''%FILENAME'''
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
// SET FILENAME='XXXXX.XXXXX.XXXX.XXXX.XXXX.D0218'
//STEVE002 EXEC PGM=IKJEFT01,PARM='DEL ''%FILENAME'''
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
SYSOUT:
ACF0C038 ACF2 LOGONID ATTRIBUTES HAVE REPLACED DEFAULT USER ATTRIBUTES
IKJ56709I INVALID DATA SET NAME, '%FILENAME'
IDC0014I LASTCC=12
READY
END
IKJ56709I INVALID DATA SET NAME, '%FILENAME'
IDC0014I LASTCC=12
READY
END
Please help. Thanks.