CPYF and CRTDUPOBJ

205 pts.
Tags:
CPYF
CRTDUPOBJ
What is the actual difference between CPYF and CRTDUPOBJ

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

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.

Regards,

Martin Gilbert.

Hi,

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)

Regards

KHADAR.

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.

Regards,

Martin Gilbert.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • RamvishakRamesh
    CPYF – works only with file – Many options like copy from which record number, copy upto which record, the record format in case of multiformat logical file is a parameter, Copy from record key,copy to record key, number of records to be copied, can also mention some condition like include records which satisfy these condition, can specify whether To file contains a compressed form of from file.(Deleted records that existed in the from file will to be copied if compressed *yes is mentioned. IF *No, then both deleted and non deleted records are copied. TRIGGER will not be copied using this command, We have to use ADDPFTRG to add trigger. CRTDUPOBJ - Used to copy single obj or group of objects. We can duplicate data, constraints and triggers. When a logical file is copied into another library, two cases determine the basing for the file: 1. If both the logical file and its based-on physical file are originally in the same library, a duplicate of the physical file must be created in the new library before a duplicate of the logical file is created. After these two duplicates are created, the new logical file is based on the new physical file. 2. If the logical file and its based-on physical file are originally in different libraries, it is not necessary to duplicate the physical file before duplicating the logical file. Then the LF will be based on the original PF. Even if the pf is copied to new library, still the duplicated LF will be based on the original PF, not the duplicated PF.
    2,505 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following