We have several master files that contain 2 companies data. Right now our system allows each company to view each other's data. I need to only allow each company to view their own data. Each file has a company code that I can use. Currently each file contains several logicals now that we use to search by name, dba, etc. So I am not sure if using a logical is the best way. I was thinking about views but I am not as familiar with them. Any suggestions?
Software/Hardware used:
ASKED:
August 12, 2008 3:42 PM
UPDATED:
August 13, 2008 5:25 PM
A view ends up being basically the same thing as a LF, except it has no keys and response is usually slower (since the system doesn’t keep it up-to-date like it does a LF).
Another option is to create 2 libraries (one for each company) , and put the LF’s in them (one for each company). That way the LF’s can have the same name as the PF. Not something I like to do, but it can make working with 3rd party pgms easier, and reduce OVRDBF issues.
Comp 1 LIBL COMPLIB1, MAINLIBR, etc
Comp 2 LIBL COMPLIB2, MAINLIBR, etc
The comp 1 user will get the LF in COMPLIB1, etc,
Creating a view or logical file is a technical viable solution. Nonetheless, splitting each company’s data into two different libraries is a better approach, from my perspective.
Besides the possibility to do it (views) there are other considerations you might like to have: security and convenience.
Having each company’s data on different libraries simplifies security because you manage security at the library level instead of having to implement it at object level (and maybe even programmatically).
If the time comes when a third company must be added, you just simply mount the libraries structure for the company without having to change the programs.
Gerardo Agüero.