Answer Wiki

There are no technical problems other than all the rules regarding file opens/updates etc still apply.
So you need to be careful about things like having say ABCD1 and ABCD2 both open in the same program and performing CHAINs and UPDATEs. Unless you specify SHARE(*NO) on the OVRDBF every record pointer change you make in ABCD1 will also occur in ABCD2. That is, if you perform a CHAIN to ABCD1 followed by a CHAIN to ABCD2 then perform an UPDATE to ABCD1 you will actually be updating the record accessed in the CHAIN to ABCD2!
Also, you have to be careful with file opens when using SHARE(*YES) since all the files are sharing the same open data path you can not perform an UPDATE on say ABCD2 if you opened ABCD1 first and you specified ABCD1 as input only.
So, generally you would always use SHARE(*NO) in your OVRDBFs and then each file would be treated as fully independent of the other. This is a good technique if you wish to say read through a file sequentially and for each record CHAIN to other records in the same file without losing your sequential read position.
There is good info on the use of OVRDBF and SHARE options in the RPG Programmers Guide. Happy reading!

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your response...

Discuss This Question: &nbsp

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

Ask a Question

Free Guide: Managing storage for virtual environments

Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!

To follow this tag...

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy