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...

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........

3552


do you use message subfiles? What are the necessary keywords required coding a message subfile?

896


Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.

2267


how do I preserve and clean the array?

845


what is kids-rpg?

891


what was the robotech rpg?

865


which program rpg or cl is efficent to update a transaction onto a database file and why ?

973


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

976


How Chain operation copies the record's data to the input buffer for the program?

1315


How would display prime numbers using CL program?

5953


can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com

2175


How many program bind in one module....

2347


What is ment by record level identifier?

853


what do you mean by an input subfile, what are the keywords required?

1017


How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

1749