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
how do you use commitment control in rpg?
What is difference between bind by copy and bind by reference?
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
thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400
What is file identifier where we can use?
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?
How many program bind in one module....
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
How to call one program from another program in RPG? please help me with the code
How can we know running job is batch or interactive?
How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
Explain mdt?
explain sflclr, sflend, sfldlt, and sflcsrrrn?