260 pts.
 Rename file in CL
Hi all. I need to check if the file exist, and rename it. t How do I check file existing in CL? Thank you.

Software/Hardware used:
ASKED: January 11, 2011  10:08 PM
UPDATED: January 12, 2011  2:15 PM

Answer Wiki:
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  AndreaF   6,150 pts.
All Answer Wiki Contributors:  AndreaF   6,150 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Perhaps simplest is just to rename it. If it doesn’t exist, ignore the error.

Tom

 108,260 pts.