In my CLP I created a file in QTEMP using CRTDUPOBJ. I then use this file in a few CL programs and a couple of RPG programs. Also, in OPNQRYF in the CL programs. At the end of the job stream my file is not removed. I have used QTEMP before without a problem; I'm wondering if using it in OPNQRYF has something to do with the problem, or maybe the file name vs label (or override name). Below is just a few lines of code from a couple of the CL pgms.
"CRTDUPOBJ OBJ(TSLSSUM) FROMLIB(QS36F) OBJTYPE(*FILE) +
TOLIB(QTEMP) NEWOBJ(TSS1580) "
"OPNQRYF FILE((QTEMP/TSS1580)) +
KEYFLD((SMCOMP) (SMSLSP) (SMCSNM) (SMITEM))"
"OVRDBF FILE(TSLSSUM) TOFILE(QTEMP/TSS1580) SHARE(*YES)"
"CALL PGM(SOLID/SS1580) PARM(&COMP &ALPH &SEQ +
&SLSP &TOLY &TODT)"
"DLTOVR FILE(*ALL) "
Thanks for any help.