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

what is the use of sflnxtchg?

795


1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?

474


what is *place and *auto keyword in prtf ?plz explain

2712


What is file identifier where we can use?

635


what is the necessary keyword needed to scroll subfile records?

695






How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique

543


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

1553


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

3267


How would display prime numbers using CL program?

5666


how do I play {insert rpg system here}?

576


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

705


can you debug ile rpg program using isdb?

730


How many program bind in one module....

2109


is this a rpg channel?

667


how do I declare a minor?

707