I'm maintaining a legacy client-server ERP application developed using PB8. I'm trying to migrate it to PB2017 due to deprecated DB-Library connection to SQL Server not available in Windows 10 clients.
Migration Assistant in PB2017 revealed 40 issues in PowerScript used. Mostly reserved syntax change required with "try", "catch" and "throws". These I could fix. Actually I found out that even the Migration Assistant in the old PB8 lists these, so the app is not even a clean PB8 level app. Never noticed before.
Because of the number of syntax changes required, I went on migrating the app in PB2017, just to see what happens. The process got completed with 1500 errors. This is too much to cope with one by one, of course. Anyway, I'm curious to understand what's going on with these.
First just a few distinct error messages that seem to be very common in my case:
Error C0042: Cannot compile without valid database sign-on.
Error C0103: Dynamic SQL command must reference DynamicStagingArea object.
Error C0019: Incompatible property sqlcode for type powerobject
Error C0003: Condition for if statement must be a boolean.
Error C0039: Cursor/Procedure (gc_cursor) has not been declared.
Error C0031: Syntax error
Error C0015: Undefined variable: gs_servername
Here's a few I'd like to hear your comments especially:
(f_fileopen).7: Error C0051: Unknown function name: shellexecute16
(f_fileopen).9: Error C0051: Unknown function name: shellexecute32
(f_fileopen).13: Error C0015: Undefined variable: gl_errorcode
(f_fileopen).14: Error C0015: Undefined variable: nok
(f_fileopen).16: Error C0015: Undefined variable: ok
(f_fileopen).18: Error C0094: Routine must return a value.
The source code of the global function f_fileopen:
global type f_fileopen from function_object
global function integer f_fileopen (string as_file)
global function integer f_fileopen (string as_file);long ll_temp
IF lo_env.Win16 THEN
ll_temp = ShellExecute16 (Handle (w_mdi_main), "open", as_file, "", "", 1)
ll_temp = ShellExecute32 (Handle (w_mdi_main), "open", as_file, "", "", 1)
IF ll_temp <= 32 THEN
The two shellexecute external functions are declared.
The three undefined variables are declared as global constant variables.
In PB8 the actions Full build and Deploy work just fine for the application.
Basically my question is: Is it worth fixing those 40 syntax issues revealed by Migration Assistant? May I expect fixing to help considerably with the 1500 errors given in the migration phase?
I would appreciate your advice!