Link to home
Start Free TrialLog in
Avatar of Hai Pham
Hai Pham

asked on

Migrate Foxpro 2.6 dos run under Novell 3.12 server to windows server.

I have Foxpro 2.6 dos run under Novell 3.12 server. I want to move it to windows server 2012r2. What I have to do to make it work multiple users?
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

You have a few options:

- Find DOS emulator which runs under W2012R2 and supports multiuser environment. You may try vDosPlus (http://www.vdosplus.org/) or maybe DOSBox.

- Try to port the application into newer FoxPro version. Or use dBase or Lianja or xBase++. These tools should be at least partly compatible to FoxPro 2.6

- Select more modern development tool and rewrite the application from a scratch
Not DOSBox.  DOSBox is for games (although you could try it if nothing else works).

Try VDOS  https://sourceforge.net/projects/vdos/ or possibly the vDosPlus that pcelba suggests.  VDOS is for business applications (but for some reason Google isn't recommending going to the author's site at the moment.)
Well i think that the best option is to make a P2V conversion and migrate your server to a VM...that way you can ensure functionality no matter what but i think its time to migrate to a newer platform...
Multiple users need to open DBF files in shared mode which then allows concurrency and records/files locking.

The basic command for the shared access is:  SET EXCLUSIVE OFF  but it should be in the application code if more users used it under Novell.

Of course, the shared access needs appropriate locking which can be done automatically in many cases but explicit record locking is better.
Hi Hai Pham,

we are interested in your progress. Did you install DOS emulator already? What are results? Do you have any additional question?

Thanks
Pavel
Avatar of Hai Pham
Hai Pham

ASKER

The program has written for Novell network. When I tried to put it on Windows server I got file access denied and resource not available when more than one user ran the foxpro menu. I used Vdos. All data and prg have been shared to everyone.
OK, did you use SET EXCLUSIVE OFF? What line in the code caused the problem?
This is what i have in config.fp
CATMAN=OFF
EXCLUSIVE=OFF
RESOURCE=OF
It didn't give me which line got the error.
Does VDOS allow shared files opening?
File access denied error means the file is open exclusively by another user. But VDOS must access these files via some driver and translate all DOS requests to Windows API calls which is not trivial or which does not reflect the shared opening.

You may look here at similar problems with VDOS: https://sourceforge.net/p/vdos/discussion/general/thread/eeb6155e/?limit=25  (with no solution). Especially the Process monitor could show the file opening parameters.

Did you try vDosPlus as offered in the first post?
These lines in menu.prg cause file access denied and resource not available:

*set reso to resource\&resfile
*set reso on

*if empty(colorset)
*      set color set to
*else
*      set color set to (colorset)
*endif
*release colorset

Can any one explain?
I suppose they are not marked by * in the first position. In such case they should not cause any problem as the * means comment.

set reso to resource\&resfile

Sets the resource file to the file name which is stored in the "resfile" variable. The file should exists in appropriate folder and it should not contain spaces in the filename.  Standard name is FOXUSER or FOXUSER.DBF
Resource file contains the windows positions and other info which can be used for the application run

The colorset is a set of colors defined for the application and it is stored in the resource file.
SET COLORSET TO (colorset) looks for the given color set (defined in colorset variable) in the resource file and applies it.

If you leave these lines commented out then the app should work w/o problems. But you may expect other File access is denied messages later.
It ran fine under Novell 3.12 server. I got this problem after placed Foxpro 2.6 on Windows 2012R2 server.
This we know already.

If your DOS emulator does not allow shared files opening then you cannot continue in multiuser environment. Did you try vDOSPlus?

Also when you install Windows XP virtual machine in your W2012 then it could allow your app run in W-XP cmd window.

Of course, the best option you can implement is the app rewrite to be compatible with the OS of your choice. You can try VFP 9, you may look for Lianja which should be compatible to FoxPro with minor changes but DOS applications will look ugly under Windows...

Remember the fact DOS FoxPro is more than 20 years old software so you cannot expect full compatibility to the latest operating systems.

What did you do in the past 20 years?
I found the problem, the resfile use netware login_name under Windows I don't have that variable.
m.colorset=allt(USER.color)
m.access=access
resfile=strt(left(m.login_name,8)," ","")
if !file("resource\"+resfile+".dbf")
      copy file &pp_dir.sysdefa.dbf to resource\&resfile..dbf
      copy file &pp_dir.sysdefa.fpt to resource\&resfile..fpt
endif

*set reso to resource\&resfile
*set reso on

*if empty(colorset)
*      set color set to
*else
*      set color set to (colorset)
*endif
*release colorset
Great!

This is good for users as they can have their own colors and app windows positions because each user has his own resource file.

If you don't have Netware login name then you can parse SYS(0) function result  or  use the  GETENV("username") or whatever is in the DOS environment available.

I am just not sure whether DOS FoxPro offers SYS(0)...
SYS(0) works
So if you obtain user from the SYS(0) then it could start working.
Yes, Thank you!
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial