How to get only unique records from a file which contains duplicate data using CPYF command ?

Example : FILEA has duplicate records and FILEB is a UNIQUE defined.... and I want to get the data from FILEA to FILEB by eliminating all the duplicate records...



How to get only unique records from a file which contains duplicate data using CPYF command ? Exa..

Answer / sandey243

There is an option in CPYF command which says " Error Allowed", making that as *NOMAX will trigger IGNORE option instead of CANCEL in CPYF processing; whenever there is duplicate record encountered.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More RPG400 Interview Questions

Are all these RPG/400 Interviewed Questions being asked recently? are current?

1 Answers  


Can anybody tell me that why we use option(*nodebugio)in H- Spec?

3 Answers  


How to get only unique records from a file which contains duplicate data using CPYF command ? Example : FILEA has duplicate records and FILEB is a UNIQUE defined.... and I want to get the data from FILEA to FILEB by eliminating all the duplicate records...

1 Answers  


If record-format name in an externally-described file has already been defined as a file-name.how to solve this?

2 Answers   CTS,


RPG/400 faqs?

1 Answers   HSBC,






1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?

0 Answers   HCL,


How Commitment and Roll back control is used in as400, explain with real time senario ???

2 Answers   Acolite, HSBC,


2. Which of the following statement(s) explains the difference(s) between the /INCLUDE and ICOPY directives? a.) No difference, they function the same b.) ACOPY cannot be used as a conditional directive c.) IINCLUDE files cannot contain embedded SQL d.) Nesting /TNCLUDE directives is not allowed

2 Answers   IBM,


what is meant by record lock.how records are locked.what is the purpose of record lock.if records are locked what happens.how to find out which record is locked.

4 Answers   HCL,


how to change the length of the field in a physicalfile?

12 Answers  


how can we find setll setgt chain read reade readp operations are successfull or not,give example.explain in detail.

4 Answers   iSoft, Wipro,


what is the necessary keyword needed to scroll subfile records?

0 Answers   IBM,


Categories