As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
You don't list your platform in your post but if you are running on a Windows box, you could check for the file existence after the copy with the DOS STATE command then poll the value of &RETCODE. &RETCODE = 0 on success and -1 otherwise.
I suppose that if the target file exists prior to the copy that you would need to delete it, then copy the new file, and then check if it exists in the target location.
APP DELETEF ... APP COPYF ... DOS STATE file -IF &RETCODE EQ 0 THEN .... ELSE...;
Testing &FOCERRNUM does not always return an error. If the app folder is not there an error will be returned if the file is not there it does not seem to return an error. Want to get rid of all DOS commands that this can be a big security hole.