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

How can we override a file during runtime in rpg?

0 Answers  


how to check on which PF , the LF is dependant ?

4 Answers   IBM,


what is flat file?

1 Answers   IBM,


Hi, can any one tell me :IN CASE OF SINGLE PAGE FILE HOW WILL I LOAD THE PREVIOUS PAGE WITHOUT THE USE OF SFLCLR INDICATOR ?

3 Answers   IBM,


what are the array operations?

1 Answers   IBM,






can you debug ile rpg program using isdb?

0 Answers   IBM,


HI,1: What is the function of 'SETON LR' AND '*INLR=*ON ? 2:Can we used "seton lr" OR "*INLR = *ON" in between the program code ? 3:if yes then according to there function the code which is written acter seton lr/ *inlr should not be execute . Can any one tell me why those code get executed ?

2 Answers  


Some times While checking MSGW for object / member / record locks ,I have seen it's locked by itself ...? How it happen and what action we need to perform if job is updating / writing a record....?

6 Answers   HSBC,


1.Can any body share me about thease opcodes with example please.Im new for AS/400.Could u please tell me in real senario? 1.TESTN, 2.EVAL 3.EVALR, TIME, 4.MONITOR 5. ENDMON 6.ON-ERROR 7.COMMIT ROLLBACK?

1 Answers   CSC,


When it is desirable to describe files Internally?

0 Answers  


Please help me, I have created window subfile,I have created Footer with same lengh and postion of window SFL. When I call the pgm, first is shows only Footer and then it shows subfile records.This time Footer is not showsing ..plz hel me how can i do it...? Sameple DDS and RPG: A R WIN1 SFL A*%%TS SD 20090130 165346 MUNSHIJ REL-V4R2M0 5769- PW1 A FLD001 1Y 0B 4 3EDTCDE (Z) A ATFILE R O 4 7REFFLD (QWHFDBAS/ATFILE LIB/LIBF- A ILE) A R WINCTL SFLCTL (WIN1) A*%%TS SD 20090202 123459 MUNSHIJ REL-V4R2M0 5769- PW1 A ALTNAME ('y') A SFLSIZ (0004) A SFLPAG (0004) A WINDOW (FOOTER) A ROLLUP (27) A ROLLDOWN (28) A CF12 (12 'Cancel') A 50 SFLDSP A N51 SFLDSPCTL A 51 SFLCLR A 1 2'Select Option,Press enter' A 2 3'1= Select' A R FOOTER A* A WINDOW(8 31 9 43) A 8 4'F12 = Cancel' A R DUMMY ASSUME A 24 10' ' in RPG: Dow *IN12 = *Off Write Footer Fxfmt WInCTL

2 Answers  


Difference between creating a report using Printer file and WRKQRY(Query Report) ?

3 Answers  


Categories