1. J Vier
  2. PowerBuilder
  3. Wednesday, 8 August 2018 08:35 PM UTC

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
end type

forward prototypes
global function integer f_fileopen (string as_file)
end prototypes

global function integer f_fileopen (string as_file);long ll_temp
environment lo_env

GetEnvironment (lo_env)

IF lo_env.Win16 THEN
ll_temp = ShellExecute16 (Handle (w_mdi_main), "open", as_file, "", "", 1)
ELSE
ll_temp = ShellExecute32 (Handle (w_mdi_main), "open", as_file, "", "", 1)
END IF

IF ll_temp
gl_errorcode=ll_temp
RETURN NOK
ELSE
RETURN OK
END IF
end function

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!


Responses (4)
  1. Likes
  2. Latest
  3. Oldest
Loading...

Find Questions by Tag

.EXE .NET 6.0 .NET Assembly .NET Core 3.1 .NET Core Framework .NET DataStore .NET Std Framework 32-bit 64-bit ADO.NET AEM AI Algorithm Amazon AWS Android Apache API APK App Store App Store (Apple) Appeon Workspace Appeon Xcelerator Plug-in Architecture Array ASE Asynchronous Methods Authentication AutoBuild AutoCompiler Automated Testing Automation AutoScript Azure Barcode Base64 Batch BigData BLOB Branch & Merge Browser Bug Build Button C# C# Class Importer C# Editor C# Model generator Calendar Camera Certificate Chrome Citrix Class Client Client/Server Cloud Cluster Collection COM Command Line Compiler Compression Computed Field Configuration Controls Cookies Cordova Crash Cross-Platform Crosstab CSharpAssembly CSharpObject CSS CSV Cursor Data Database Database Driver Database Painter Database Profile Database Provider DataObject DataSource DataStore DataStore (C#) DataStore (PS) DataType DataWindow DATE DATETIME DB2 Debug Debugger Debugging Deployment Design DLL DO-WHILE Dockable Docker Documentation DOUBLE Download DragDrop Edge Edit Style Editor Elevate Conference Email Embedded SQL Emulator Encoding Encryption Enhancement Request Entity Entity Framework ERP Error Event Event Handler Event Handling Excel Exception Export Expression External Functions F# Field File File Access Filter Firefox Firewall Font FOR-NEXT Foreground Format Function Garbage Collection GeoLocation Git Graph HANA Hash Header HTML/5 HTTP/S HTTPClient Icon IDE Identity IIS IMAPI Import InfoMaker Inheritance Installation Integer IntelliSense Interface Internet Internet Explorer iOS IPA iPad iPhone IWA J# Java JavaScript JBoss JDBC JOIN JSON JSONGenerator JSONParser Kestrel Label Lambda Large File LDAP Library License LINQ Linux OS Load Balancing Localization Localized PBVM Log In Log Out Logging LONG LONGLONG macOS MAPI Maps MDI Memory Memory Leak Menu Merge MessageBox Messagging Method Migration MIME TYPE Mobile Model ModelStore ModelStore (C#) MSOLEDBSQL Multi Threading MVC MySQL n-Tier Namespace NativePDF NVO OAuth ODATA ODBC Office Offline OLE OLEDB Online Open Source OpenAPI OpenSSL Oracle OrcaScript Other Outlook Output Package Parameter Patch PayPal PB Classic PB Native PB.NET PBC PBD PBDOM PBG PBJVM PBL PBNI PBORCA PBVM PBX PDF Performance Permission PFC Picture Pipeline Play Store (Google) Plugin Popup Port POST PostgreSQL PowerBuilder PowerBuilder (Appeon) PowerBuilder (SAP) PowerBuilder Compiler PowerBuilder Runtime PowerClient PowerScript (PS) PowerScript IDE PowerScript Migrator PowerServer PowerServer Mobile PowerServer Toolkit PowerServer Web PowerServerLabel Print Properties Proxy Publish PULL PUSH Query Regression Release Renew Resize Response REST Retrieve RibbonBar RibbonBar Builder Rich Text Roadmap RPC Runtime Packager SaaS Scaffolding Script SDI SDK Security Server Service Session Single Sign-on Size SMTP SMTPClient SnapDevelop SOAP Sort Source Code Speech Recognition SQL SQL Anywhere SQL Server SqlBuilder SqlExecutor SQLite SqlModelMapper Storage Stored Procedure Subscription SVN Swagger Syntax TabbedBar TabbedView Tablet TabPage Target TE Control Testing Text TFS Theme TIME Timer TLS/SSL Tomcat TortoiseGit TortoiseSVN Transaction Transparency Trial Trigger TRY-CATCH TX Control Type UI ULONG UltraLite Uninstall Unit Test Unit Testing UNIX OS Update Upgrade Upload URL User Center User Object UWP Validation VARCHAR Variable Versioning Visual Studio Visual Studio Code VM Voice Warning WCF Web API Web Extensions Web Service WebBrowser WebForms WebLogic WebSphere WildFly WinAPI Window Windows OS WinForms Wizard Workgroup Workspace WPF XCODE XHTML XML Zoom

Helpful?

If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.