If another job allocates a member with too strong a lock state, the copy operation might end with an error message. This is also true if the library containing the file is renamed during the copy operation.
WRKACTJOB
Option 11 (Work with Locks)
Option 5 (Work with Job Member Locks)
Option 8 (Work with Object Locks)
DSPDBR
DSPFD
DSPFFD
WRKJOB
Option 12 (Work with Locks, if active)
Option 5 (Work with Job Member Locks)
F10 (Display Open Files, if active)
WRKLIB
The library containing the to-file
DSPLIB
The library containing the to-file
WRKOBJLCK
WRKRCDLCK
If you want to display any information about a to-file, you must anticipate the requirement and force the copy command to use block record-at-a-time operations by specifying ERRLVL(1).
If you anticipate that problems might arise because of this, you can preallocate the files and members using the Allocate Object (ALCOBJ) command.