In your CL program do:
CHKOBJ OBJ(&FILE) OBJTYPE(*FILE)
MONMSG CPF9801 EXEC(GOTO FOUND)
** Do your rename here
FOUND:
You may rename a file by right-clicking and selecting 'Rename' - but as your question has a Database tag and a reference to CL, I am thinking that you mean something much more specific than your question indicates. Could you supply more information?
Last Wiki Answer Submitted: January 11, 2011 10:49 pm by AndreaF6,150 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
Perhaps simplest is just to rename it. If it doesn’t exist, ignore the error.
Tom