CPYF only works with files, CRTDUPOBJ works with other objects as well. CPYF has much more capability for selection of records and is really built as a tool for data manipulation, CRTDUPOBJ doesn't have this functionality - if you use CRTDUPOBJ for a file you can only copy all data or no data.
You can use
CRTDUPOBJ to Create an Objecte (replica) , but it will not contain any member .
CPYF to Copy set of records from one file to another , here both members must be existed.
If you haven't have an object of the to file you can create while CPYF CREATEFILE(*YES)
That's not true - CRTDUPOBJ <b>does</b> create a member if there's one in the original file and if it's available (not locked) when running the command.
Last Wiki Answer Submitted: March 23, 2009 2:45 pm by Khadar90 pts.