Hi,
I have a question when i seen my requirement.
I have two physical files and one RPG program.
What I need is, I want to write RPG code for " Copy updated records from one physical file to another physical file" . (Another physical file is for Backup Purpose. )
Regards
Surya P
Software/Hardware used:
ASKED:
September 18, 2012 8:51 AM
UPDATED:
September 18, 2012 12:21 PM
Copy updated records from one physical file to another physical file
How does your program know the records were updated? Does it also perform the UPDATE?
Tom
Whenever my program runs the records in physical should copy to my backup physical file…
…the records in physical should copy to my backup…
We already know that. But what we don’t know is: How does your program know the records were updated? Does it also perform the UPDATE?
Tom
How does your program know which records to copy? Does it copy every record? If it does, why don’t you run the CPYF command instead?
Or does it only copy some records? If it does, how does know which records to copy? If it can recognize the correct records, why not just use the CPYF command instead? Why do you need an RPG program?
If RPG is needed, then there must be more to the problem. What else is needed to know?
Tom
No need check for update or anything else..Only i need to copy the records from “PF”(physical file) to “Backuppf”(backup physical file).What command i have to use…
Personally, I wouldn’t copy the records at all. I would journal the file and simply use the journal if recovery is needed. Of course, regular saves (backup operations) of the file and of the journal receivers would be done. — Tom