Convert PowerBuilder to C# - Ispirer

Convert PowerBuilder to C#

Delivering you an intelligent and high quality result in due time!

Benefit from the Ispirer top-notch migration services and robust automated solutions. Foster migration, and optimize the cost and performance of your IT infrastructure by converting your PowerBuilder application to C# with Ispirer.

Migrate PowerBuilder to C#

Chip

nGLFly Wizard for automated migration

NGLFly Wizard offers a range of opportunities for automated PowerBuilder to C# conversion with minimum manual corrections:

  • Free assessment Metrics tool to analyze your database and estimate migration complexity
  • Assistance in NGLFly configuration
  • Automated migration of the entire application, including project files, business logic, GUI and database API
  • Prompt customization of the tool to maximize automation rate
  • Expert support during the entire project

Stop losing time and avoid operational costs by moving PowerBuilder to C# with Ispirer.

Book a demo

People

Turnkey migration service

Turnkey PowerBuilder to C# migration service provided by Ispirer professionals includes:

  • Migration of the entire application, including project files, business logic, GUI and database API
  • Team of experts skilled in PowerBuilder and C#
  • Tailored migration roadmap from assessment through migration and testing to cutover
  • Smart automation with Ispirer Toolkit
  • Assistance in deployment and integration, performance optimization, new feature development



Drop us a line and we’ll discuss and estimate your PowerBuilder to C# project.

Request a quote



NGLFly Wizard for Automated App Conversion

NGLFly Wizard Logo

NGLFly Wizard is a tool for automated application conversion. This solution makes it possible to translate code from one programming language to another automatically, while preserving the initial functionality of an application. Based on an intelligent proprietary algorithm, the tool analyzes the syntax, semantics, mapping data types, control structures, function calls, and even code structures that do not have equivalents in a target technology. Based on the analysis, nGLFly Wizard applies all the relevant conversion rules from its knowledge base core and translates the source code to the target technology.

NGLFly supports both legacy and most popular programming languages, such as COBOL, Delphi, Informix 4GL, Powerbuilder, C#, Java, Python, JavaScript, and others. To ensure a smooth translation process, our support experts are available to assist with tool configuration or resolve any issues in a timely manner.

High quality

High quality code conversion.

Expert system with 20.000+ conversion rules and 100.000+ automation tests.

Flexibility

Flexibility

Nimble configuration with 300+ parameters and options for effective application code conversion.

Free smart assessment

Free smart assessment

Free assessment Metrics for migration scope and complexity evaluation.

Intuitive and instructive reports

Comprehensive migration analysis

Intuitive and instructive reports for cost-effective post-migration polishing.

PowerBuilder to C# Conversion Demo

Check out how Ispirer Toolkit automatically converts PowerBuilder application.


Drop us a line, if you have any business inquiries or questions regarding your PowerBuilder conversion project. Ispirer experts will demonstrate our solutions and answer any questions you may have!

Contact us


Turnkey Migration Service

The entire conversion process can be divided into several stages:

  • Preparation. During the preparation stage, the focus lies on planning and preparing applications and infrastructure for migration to a new environment or platform. This involves assessing their current state to gauge compatibility with the target environment and defining the migration strategy, timeline, and required resources. Additionally, identifying potential risks and challenges associated with the migration process and devising mitigation strategies are integral parts of this stage.

APP Services general

  • Assessment. During the assessment phase, the team conducts a thorough analysis of the source code to accurately estimate the migration timeframe and cost. As a first step, we apply Metrics - a set of Ispirer’s proprietary assessment tools tailored to different programming languages. These metrics automatically analyze the source application, gathering essential information and generating a comprehensive report. This report combined with the insights gathered during the expert review of the source code serves as the basis for estimating the delivery time and cost of the migration project.
  • Automated conversion with Ispirer Toolkit. Considering the inherent characteristics of the original technology, Ispirer Toolkit can provide varying default levels of automated code conversion. Importantly, Ispirer experts can iteratively customize the tools to meet the specific properties and patterns of the source code and thus increase the level of automated conversion.
  • Post-conversion refinement. Often an application may contain code segments that are impossible or ineffective to migrate automatically. In such a case, our team of Ispirer experts leverages their extensive knowledge and expertise to meticulously execute the manual migration of the remaining code. Moreover, this stage involves fine-tuning the application to improve its performance in the new environment. This may include optimizing resource allocation, tuning database configurations, and addressing any performance bottlenecks.
  • Functional testing. Functional testing ensures that the migrated application behaves as expected and meets the functional requirements in the new environment. The Ispirer experts run hundreds of tests to ensure that the converted application is reliable and meets user requirements, business objectives, and industry standards.

Why choose conversion over developing a new app?

Seasoned Team

Same functionality, new application

Migration does not require labor-intensive development of new functionality from scratch. Your application will be converted to a new technology while maintaining the original functionality

Enhanced efficiency

Architecture preserved or modified

By default, automated conversion implies preserving the initial architecture which is easier to maintain. It is also possible to transform the app architecture, for example, from desktop to the web and thus improve accessibility and scalability

Integrate

Legacy System Transformation

Migrating legacy systems to modern architectures or platforms can future-proof your application, making it easier to maintain, update, and extend in the long term

Advanced security

The speed of conversion

Migrating an application is much faster than creating a new one from scratch. Automated migration with Ispirer Toolkit minimizes manual effort and may speed up the delivery by 2-3 times

Growth

Performance and Scalability

Through conversion, you can optimize the application's architecture and infrastructure, improving scalability and performance without the need to rebuild everything

Advanced security

No need for documentation

To perform the conversion, we go by your source code. There is no need to have detailed documentation in place to start the conversion as is the case with development

Looking for PowerBuilder to C# Conversion Services?

Drop us a line and we’ll estimate your project for free!

Request a quote

Conversion Samples of PowerBuilder to C# WPF

PowerBuilder programs consist of Workspaces (starting from PB 8.0 and higher, these are .pbw files). Conceptually, they are similar to Solution. These are text files consisting of paths to the Target files (.pbt files) that correspond to the concept of Project. The Target files are in text format, and each contains paths to the PowerBuilder libraries (.pbl files that store source code files in binary format). Typically a library with the same name as the Target file has a .sra entry point file.

To convert a PowerBuilder application, you need to extract all source files from the appropriate Workspace libraries (or Target, if PB version is less than 8). You can download Ispirer PowerBuilder Metrics to get a statistical report on PB sources, as well as extract source files from PowerBuilder libraries using Workspace, or a set of Target files, or a set of particular PB libraries (.pbl files) that need to be converted.

Once the source code is extracted, for each PowerBuilder library file, a corresponding folder named library will be created with all the source code extracted. The folders will contain source files with the following file extensions:

  • .SRD - DataWindow source files
  • .SRW - Window source files
  • .SRM - Menu source files
  • .SRU - Custom user object source files
  • .SRS - Structure source files
  • .SRP - Data pipeline source files
  • .SRF - Function source files
  • .SRQ - Query source files
  • .SRA - Application source files

Now you can use Ispirer nGLFly Wizard to convert it to your chosen target technology.
Basic source type conversion by extension:

  • .SRD - converted to 3 files in a folder named datawindow_object_name_srd. The files are named datawindow_object_name_srdView.xaml and datawindow_object_name_srdView.xaml.cs – the UI and code of the DataWindow object and file datawindow_object_name_srdViewModel.cs with view model of the DataWindow object.
  • .SRW - converted to 3 files in a folder named window_object_name_srw. The files are named window_object_name_srwView.xaml and window_object_name_srwView.xaml.cs – the UI and code of the Window object and file window_object_name_srwViewModel.cs with view model of the Window object.
  • .SRM - converted to 3 files in a folder named menu_object_name_srm. The files are named menu_object_name_srmView.xaml and menu_object_name_srmView.xaml.cs – the UI and code of the Menu object and file menu_object_name_srmViewModel.cs with view model of the Menu object.
  • .SRU - converted to 1 file named user_object_name_sru.cs for nonvisualobject and to 3 files in folder named user_object_name_sru. The files are named user_object_name_sruView.xaml and user_object_name_sruView.xaml.cs – the UI and code of the User object and file user_object_name_sruViewModel.cs with view model of the User object.
  • .SRS - converted to 1 file named structure_object_name_srs.cs. The file contains a class with variable declarations from the PowerBuilder structure.
  • .SRP - not used for conversion.
  • .SRF - converted to 1 file named function_object_name_srf.cs. The file has a public static partial class AppGlobalFunctions with a converted function.
  • .SRQ - not used for conversion.
  • .SRA - converted to 1 file named application_object_name_sra.cs. The contents of this file are used to copy into the project's entry point file in the same way as in the conversion sample.

After the conversion, you need to create a WPF application desktop project in Visual Studio and add the converted files from the results folder to it. There is the Ispirer framework for converting PowerBuilder to C# WPF (IspirerFramework) in the results folder. It contains 4 or more projects that should be added to the solution and used in the main project with the conversion results as references. The events are converted to the corresponding events of the target technology. Note: this is a special framework provided by Ispirer. It extends the target technology to enable specific source code features.

Variables declarations conversion:

PowerBuilderC#
  1.  
  2. long var1
  3. long var2[]
  4. string var3
  5. datetime var4
  6. boolean var5
  7. decimal var6
  8. integer var7
  9. any var8
  10.  
  1.  
  2. int? var1 = 0;
  3. UnboundedArray < int? > var2 = new UnboundedArray < int? >();
  4. string var3 = string.Empty;
  5. DateTime? var4 = new DateTime(1900, 1, 1);
  6. bool? var5 = false;
  7. decimal? var6 = null;
  8. int? var7 = 0;
  9. object var8 = new object();
  10.  

Function conversion:

PowerBuilderC#
  1.  
  2. public function string sample_function();
  3. return "end"
  4. //do logic
  5. end function
  6.  
  1.  
  2. public string sample_function()
  3. {
  4. return "end";
  5. //do logic
  6. }
  7.  

Subroutine conversion:

PowerBuilderC#
  1.  
  2. protected subroutine sample_sub (string v_app);
  3. v_app = ""
  4. //do logic
  5. end subroutine
  6.  
  1.  
  2. public void sample_sub(string v_app)
  3. {
  4. v_app = "";
  5. //do logic
  6. }
  7.  

If statement conversion:

PowerBuilderC#
  1.  
  2. integer i
  3.  
  4. if true then i = 1 else i = 2
  5.  
  6. if true then
  7. i = 3
  8. end if
  9.  
  1.  
  2. int? i = 0;
  3.  
  4. if (true)
  5. {
  6. i = 1;
  7. }
  8. else
  9. {
  10. i = 2;
  11. }
  12.  
  13. if (true)
  14. {
  15. i = 3;
  16. }
  17.  

For statement conversion:

PowerBuilderC#
  1.  
  2. For lv_count = 1 to 10
  3. lb_units[lv_count].Visible = TRUE
  4. Next
  5.  
  1.  
  2. for (lv_count = 1; lv_count <= 10; lv_count ++)
  3. {
  4. lb_units[lv_count - 1].Visibility = Visibility.Visible;
  5. }
  6.  

While statement conversion:

PowerBuilderC#
  1.  
  2. IDX = 0
  3. do while true
  4. if IDX = 10 then exit
  5. IDX = IDX + 1
  6. loop
  7.  
  1.  
  2. idx = 0;
  3.  
  4. while (true)
  5. {
  6. if (idx == 10)
  7. {
  8. break;
  9. }
  10.  
  11. idx = idx + 1;
  12. }
  13.  

Try catch statement conversion:

PowerBuilderC#
  1.  
  2. try
  3. IDX = 1 / 0
  4. catch (Exception ex )
  5. IDX = 100
  6. FINALLY
  7. IDX = IDX * 2
  8. end try
  9.  
  1.  
  2. try
  3. {
  4. idx = 1 / 0;
  5. }
  6. catch (Exception ex)
  7. {
  8. idx = 100;
  9. }
  10. finally
  11. {
  12. idx = idx * 2;
  13. }
  14.  

Try choose statement conversion:

PowerBuilderC#
  1.  
  2. integer some_id
  3. boolean cond
  4.  
  5. CHOOSE CASE some_id
  6. Case IS < 0
  7. cond = False
  8. CASE 0 TO 2
  9. cond = True
  10. some_id = 200
  11. Case IS > 0
  12. cond = True
  13. CASE ELSE
  14. cond = False
  15. some_id = 0
  16. END CHOOSE
  17.  
  1.  
  2. int? some_id = 0;
  3. bool? cond = false;
  4.  
  5. if (some_id < 0)
  6. {
  7. cond = false;
  8. }
  9. else if (some_id >= 0 && some_id <= 2)
  10. {
  11. cond = true;
  12. some_id = 200;
  13. }
  14. else if (some_id > 0)
  15. {
  16. cond = true;
  17. }
  18. else
  19. {
  20. cond = false;
  21. some_id = 0;
  22. }
  23.  

Inline query conversion:

PowerBuilderC#
  1.  
  2. global type s_2 from structure
  3. long field_1
  4. end type
  5. s_2 param1[]
  6.  
  7. INSERT INTO TAB1
  8. (
  9. COL1 , COL2
  10. )
  11. VALUES
  12. (
  13. :param1[1].field_1,
  14. :param1[2].field_1
  15. );
  16.  
  1.  
  2. public class s_2
  3. {
  4. public int? field_1 = 0;
  5. }
  6.  
  7. UnboundedArray< s_2 > param1 = new UnboundedArray< s_2 >();
  8. var dbCmd_ = new SACommand();
  9. dbCmd_.CommandText = "INSERT INTO TAB1 " +
  10. " ( " +
  11. " COL1 , COL2 " +
  12. " ) " +
  13. " VALUES " +
  14. " ( " +
  15. " :field_1, " +
  16. " :field_1 " +
  17. " )";
  18. dbCmd_.Parameters.AddWithValue("field_1", param1[0].field_1 ?? (object) DBNull.Value);
  19. dbCmd_.Parameters.AddWithValue("field_1", param1[1].field_1 ?? (object) DBNull.Value);
  20. dbCmd_.CommandType = CommandType.Text;
  21. AppGlobalVariables.sqlca.ExecuteNonQuery(dbCmd_);
  22.  

CURSOR conversion:

PowerBuilderC#
  1.  
  2. String v_uname[]
  3. Long v_unum[]
  4. Int v_count = 1
  5.  
  6. DECLARE c_unit CURSOR FOR
  7. SELECT U_NAME, U_NUM
  8. FROM UNT
  9. WHERE A_NUM = 10;
  10.  
  11. OPEN c_unit;
  12. FETCH c_unit INTO :v_uname[v_count],:v_unum[v_count];
  13. v_count ++
  14. Do While SQLCA.SQLCode = 0
  15. FETCH c_unit INTO :v_uname[v_count],:v_unum[v_count];
  16. v_count ++
  17. Loop
  18. CLOSE c_unit;
  19.  
  1.  
  2. UnboundedArray< string > v_uname = new UnboundedArray< string >();
  3. UnboundedArray < int? > v_unum = new UnboundedArray < int? >();
  4. int? v_count = 1;
  5. var dbCmd_c_unit = new SACommand();
  6. dbCmd_c_unit.CommandText = "SELECT U_NAME, U_NUM " +
  7. " FROM UNT " +
  8. " WHERE A_NUM = 10";
  9. dbCmd_c_unit.CommandType = CommandType.Text;
  10. var c_unit = sqlca.ExecuteReader(dbCmd_c_unit);
  11.  
  12. if (c_unit.Read())
  13. {
  14. v_uname[v_count] = c_unit?.GetString(0);
  15. v_unum[v_count] = c_unit?.GetInt32(1);
  16. }
  17. else
  18. {
  19. sqlca.SqlCode = 100;
  20. }
  21.  
  22. v_count ++;
  23.  
  24. while (sqlca.SqlCode == 0)
  25. {
  26. if (c_unit.Read())
  27. {
  28. v_uname[v_count] = c_unit?.GetString(0);
  29. v_unum[v_count] = c_unit?.GetInt32(1);
  30. }
  31. else
  32. {
  33. sqlca.SqlCode = 100;
  34. }
  35.  
  36. v_count ++;
  37. }
  38.  
  39. c_unit.Close();
  40. c_unit.Dispose();
  41.  

Download Sample Code

You have just examined only a piece of the PowerBuilder to C# conversion sample. You can download the entire application migration sample for free by filling out the form. Once you get the code sample, you will be able to:

  • Explore how well Ispirer Toolkit migrates the source code to the target technology without downloading it.
  • Analyze and compare the source sample with your code to understand which components of your application can be automatically converted using Ispirer Toolkit.
  • Run, play with and test an application containing nearly 1,500 lines of code.

See for yourself that Ispirer Toolkit can automatically convert not only a single piece of code, but an entire application. Most likely, complex code will require customization of the toolkit, but our experts can add new conversion rules within 3-5 business days. As a result, using Ispirer Toolkit you will get readable and maintainable code of manual conversion quality in the shortest time possible.

Snatch a totally free opportunity to see the high efficiency of Ispirer Toolkit!

Get your sample code
Enter your name.

Enter a valid e-mail address.

Select your country.

Invalid input.

Our Projects

Why Migrate with Ispirer

With a proven track record validated by both time and satisfied clients, Ispirer software and services stand as the pinnacle choice for database migration and application modernization. Leveraging years of experience and client feedback, Ispirer guarantees smooth transitions and optimized operational efficiency for businesses of all scales.

  • Seasoned team. Ensuring high security and performance standards is what we do best, thanks to our impressive experience in building reliable and scalable solutions.
  • Technology expertise. Having 20+ years of experience our team has gained a wide pool of expertise in various programming languages from the rarest to the most popular ones.
  • Top-notch data security. We comply with ISO 27001 security management requirements with comprehensive policies and processes, advanced security technology, and skilled professionals.
  • Proprietary tools. In migration projects we employ Ispirer proprietary tools which underscores our dedication to delivering solutions of utmost reliability and performance. Compiled on a daily basis, this toolkit continually integrates dozens of new conversion rules, thereby consistently enhancing the automation capabilities. Find out more about our solution in the infographic:
Infographics showing how automatic application and database migration brings benefits

What Our Customers Say

Get in touch with us!

Have questions about migration from PowerBuilder to C#?

Contact us
THIS SITE USES COOKIES: By continuing to browse this site, you give your consent for cookies to be used. For more details, please read our Privacy Policy and Cookies Policy.
I Got it