When running copy or append command, the files containing details on export/ import parameters used by the copy and export/ import logs associated with the copy are only retained if the process errors out. If the process exits successfully, then these files are deleted. This solution delves on how to preserve the files regardless of success or failure of the copy/append.
The log files for copy/append containing details on the export/import parameters and the export/import logs are created in the $SP_SYS_VARDIR/temp directory. The only way to retain them even after the copy succeeds is to set debug on copy with the following flag on both source and target prior to issuing a copy:
VERSION 6.x only:
sp_ctr>set param SP_OSY_DEBUG 0x00008000 (for retaining parameter files)
sp_ctr>set param SP_OSY_DEBUG 0x00010000 (for retaining log files)
NOTE: it is only possible to retain one of the two, namely the parameter file or the export/import logs.
VERSION 7.x and above:
sp_ctr>set param SP_OSY_DEBUG 4
To change the behavior of this retention back to normal (where the files will be deleted after a successful completion), reset the parameter as:
sp_ctr>reset param SP_OSY_DEBUG