← All errors

CPF

CPF2817 Copy command ended because of error

Most common cause

CPYF fails, nearly always because source and target layouts differ and FMTOPT was not given.

Other causes

  • The target file does not exist and CRTFILE is *NO.
  • Invalid data in numeric fields during mapping.
  • Duplicate key in the target file.

How to fix it

Read the diagnostic message just before it in the job log: it gives the exact reason. For different layouts use FMTOPT(*MAP *DROP); to create the target, CRTFILE(*YES).