My preferred method would be to split the data into 2 libraries – maybe you could have a common library for files / tables which both companies need to access.
<b>!!! Make sure you have a full backup before you try anything like this !!!</b>
Assuming you want to use company 01 and company 02 – create a duplicate of the current library as libnam02, rename the existing library as libnam01. Use SQL to remove the company 01 data from the libnam02 library. Use SQL to remove the company 02 data from the libnam01 library. Create a common library for the common data files (files which don’t have company codes). Copy or move the files without company codes to the common library and remove them from both libnam01 and libnam02 libraries.
Setup your separate users to have the correct libnamxx library at the top of their library list, followed by the common library.
This should work in many cases – Of course it all depends on how your software works and how your system is setup. Also bear in mind that any changes you make to files may have to be done in both company libraries in the future.