Convert PowerBuilder to Java

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

Automated Application Conversion

Do you need to convert your PowerBuilder application to Java? In this case, Ispirer products will be the perfect solution for your project!
Human-written code in each project has its own specifics. It may seem difficult to obtain a high level of automated conversion. With Ispirer it will be a smooth transition. The main advantage of Ispirer Toolkit is the personalization for your conversion project. As a result, you will replace the old technology with all its downsides. The outcome will be a new application without any middleware used afterwards.

How it Works

Ispirer Toolkit

Automated conversion of PowerBuilder to Java with the help of our tool makes it possible to significantly reduce the time and expenses as compared to manual rewriting of the application. The following approach allows to ensure high quality of automated conversion:

1. Preliminary Stage

The stage is carried out to determine the current conversion level of Ispirer Toolkit. The level of conversion depends on the complexity of the source code and the requirements for the target application. You can independently perform the analysis of the source code of your PowerBuilder application, as well as try to convert it to Java using the demo license. Besides, our experts can perform the source code analysis and provide you with examples of its conversion.
If your application is quite specific and large, we recommend to perform PoC to determine the maximum level of automated conversion of your project.
As a result, we will find out whether the customization is required or you can directly proceed to the conversion.

2. Ispirer Toolkit Customization Stage

If this stage is necessary, we will perform the customization to thoroughly prepare the toolkit for the conversion according to your project requirements. We will take a part of a representative code that amounts ussually to ~100,000 lines. The Ispirer technical team will add all the required conversion rules into the tool to achieve the highest possible level of automation or even to get a compilable result. As a delivery, we will provide conversion results of the scope of this customization. The customer will get a tailored and updated tool according to his specific project needs.

3. Use of Ispirer Toolkit

At this stage, you perform the conversion yourself. As to pricing, we apply project-based licensing. Prices depend on its scope and duration. The license includes support as well. If necessary, the conversion may be further improved even at this stage. As a result, customization requests, each of which is processed within 1-3 business days, are added to the license. Our experts will recommend the optimal number of requests considering the complexity and requirements of your project.

Ispirer Toolkit 10 Icon

Ispirer Toolkit 10
PowerBuilder to Java
Free Demo License

Try Now

Ispirer Migration and Modernization Service (Ispirer Service)

Our experienced team can provide you with a turnkey migration service and convert your entire PowerBuilder application to Java, delivering you a ready-to-use application in due time. Our responsibilities include not only professional analysis, assessment, performance and testing of your migration, but also services such as adding new or changing existing functionality of the application.

If you want to get an intermediate result of the converted PowerBuilder code in the Java language, the Ispirer team will be glad to provide you with a basic migration service. As a result, you will get code that is optimized to the compilable level. Further, you will have to independently bring the application to a fully functional state in accordance with your requirements.

You are free to choose a preferred option. Nevertheless, we can provide an estimate of both the Tool and the Service, and give professional advice.


Conversion Samples of PowerBuilder to React and Java

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 2 files. One file is named DatawindowObjectName.ts (located on the client) - the UI and code for the DataWindow object. The other file is called DatawindowObjectController.java (located on the server) that contains the sql query.
  • .SRW - converted to 2 or 3 files. The files are named WindowObjectNamePage.tsx and store.ts (located on the client) - the UI and code of the Window object. If the source file contains sql queries, the WindowObjectNameController.java file is converted to the server with sql queries.
  • .SRM - converted to 1 file named Menu ObjectName.tsx. – the UI and menu object code.
  • .SRU - converted to 1 file named store.ts for the non-visual object and 2 files named store.ts and UserObjectName.tsx - the UI and code of the User object.
  • .SRS - converted to 1 file named StructureObjectName.ts. The file contains a class with variable declarations from the PowerBuilder structure.
  • .SRP - not used for conversion.
  • .SRF - converted to 1 file named functionObjectName.ts. The file has a public function.
  • .SRQ - not used for conversion.
  • .SRA - converted to 1 file named applicationObjectName.ts. 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 React and Java (IspirerFramework) in the results folder.
Note: this is a special framework provided by Ispirer. It extends the target technology to enable specific source code features.

Variables declarations conversion:

PowerBuilderReact + Java
  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. let var1: number = 0;
  3. let var2: Array<number> = [];
  4. let var3: string = '';
  5. let var4: Date;
  6. let var5: boolean = false;
  7. let var6: number = 0;
  8. let var7: number = 0;
  9. let var8: any = null;
  10.  

Function conversion:

PowerBuilderReact + Java
  1.  
  2. public function string sample_function();
  3. return "end"
  4. //do logic
  5. end function
  6.  
  1.  
  2. function sampleFunction(): string {
  3. return 'end';
  4. //do logic
  5. }
  6.  

Subroutine conversion:

PowerBuilderReact + Java
  1.  
  2. protected subroutine sample_sub (string v_app);
  3. v_app = ""
  4. //do logic
  5. end subroutine
  6.  
  1.  
  2. function sampleSub(vApp: string) {
  3. vApp = '';
  4. //do logic
  5. }
  6.  

If statement conversion:

PowerBuilderReact + Java
  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. let i: number = 0;
  3.  
  4. if (true) {
  5. i = 1;
  6. } else {
  7. i = 2;
  8. }
  9.  
  10. if (true) {
  11. i = 3;
  12. }
  13.  

For statement conversion:

PowerBuilderReact + Java
  1.  
  2. For lv_count = 1 to 10
  3. lb_units[lv_count].Visible = TRUE
  4. Next
  5.  
  1.  
  2. for (lvCount = 1; lvCount < 10; lvCount++) {
  3. lvCount[lvCount].visible = true;
  4. }
  5.  

While statement conversion:

PowerBuilderReact + Java
  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. while (true) {
  4. if (idx === 10) {
  5. break;
  6. }
  7. idx = idx + 1;
  8. }
  9.  

Try catch statement conversion:

PowerBuilderReact + Java
  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. idx = 1 / 0;
  4. } catch (ex) {
  5. idx = 100;
  6. } finally {
  7. idx = idx * 2;
  8. }
  9.  

Try choose statement conversion:

PowerBuilderReact + Java
  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. let someId: number = 0;
  3. let cond: boolean = false;
  4.  
  5. switch (true) {
  6. case someId < 0:
  7. cond = false;
  8. break;
  9. case someId >= 0 && someId <= 2:
  10. cond = true;
  11. someId = 200;
  12. break;
  13. case someId > 0:
  14. cond = true;
  15. break;
  16. default:
  17. cond = false;
  18. someId = 0;
  19. break;
  20. }
  21.  

Inline query conversion:

PowerBuilderReact + Java
  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. Client (typescript):
  3. export type s2 = {
  4. field1: number;
  5. };
  6.  
  7. export class S2 {
  8. static create(): s2 {
  9. return {
  10. field1: 0,
  11. };
  12. }
  13. }
  14.  
  15. let param1: Array<s2> = [];
  16.  
  17. await request({
  18. path: 'fileName/query1',
  19. body: {
  20. params: [param1[0].field1, param1[1].field1],
  21. },
  22. method: 'POST',
  23. });
  24.  
  25. server (Java):
  26. private String QUERY1 = "INSERT INTO TAB1 "+
  27. "( "+
  28. "COL1 , COL2 "+
  29. ") "+
  30. "VALUES "+
  31. "( ?, ?) ";
  32.  
  33. @PostMapping(value = "/query1")
  34. public @ResponseBody
  35. int query1(@RequestBody Map<String, Object> body) throws Exception {
  36.  
  37. return sqlService. jdbcUpdate (QUERY1, (List<Object>)body.get("params"));
  38. }
  39.  

CURSOR conversion:

PowerBuilderReact + Java
  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. Client(typescript) :
  3. let vUname: Array<string> = [];
  4. let vUnum: Array<number> = [];
  5. let vCount: number = 1;
  6.  
  7. let rows = await request({
  8. path: 'fileName/query1',
  9. body: {
  10. params: [],
  11. },
  12. method: 'POST',
  13. });
  14.  
  15. for (let i = 0; i < rows.length; i++) {
  16. vUname[v_count] = rows[i].U_NAME;
  17. vUnum[v_count] = rows[i].U_NUM;
  18. vCount++;
  19. }
  20.  
  21. server(Java):
  22. private String QUERY1 = "SELECT U_NAME, U_NUM FROM UNT WHERE A_NUM = 10 ";
  23.  
  24. @PostMapping(value = "/query1")
  25. public @ResponseBody
  26. Object query1(@RequestBody Map<String, Object> body) throws Exception {
  27.  
  28. Object values = sqlService.jdbcSelect(QUERY1, (List<Object>)body.get("params"));
  29. return ResponseEntity.ok(values);
  30. }
  31.  

How to start the client:

1) Install nodejs;
2) Open the ReactClientName folder in vs code;
3) Open terminal (Ctrl +`);
4) Run the command: npm i;
5) Run the command: npm run start;
6) Open the URL in your browser: http://localhost:3000/.

How to start the server:

1) Open the JavaServerName folder in vs code;
2) Switch to the Run and Debug tab (Ctrl + Shift + D);
3) Click the Server Application button.

Download Sample Code

You have just examined only a piece of the PowerBuilder to Java 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 2,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.

Get a Quote

Ispirer Toolkit

Reach the maximum level of automation and quality of your conversion with the help of Ispirer Toolkit! Based on your requirements, the Ispirer team will process all customization requests for your PowerBuilder to Java conversion project. We offer several types of Ispirer Toolkit licenses, among which you will find the one that is suitable for you. Each conversion project is considered and discussed separately, prices depend on its scope, duration and complexity.

Ispirer Toolkit 10 Icon

Ispirer Toolkit 10
PowerBuilder to Java

Request a Quote

Ispirer Service

If you don't want to involve your own resources to move the PowerBuilder application to Java, get Ispirer Migration and Modernization Service and we will deliver you an operational and high-quality end-result on time and at a reasonable price. Apart from professional Analysis, Evaluation, Performance and Testing of your migration, we also provide such services as Code Refactoring, Changing Functionality, and Adding Extra Functionality. Each conversion project is reviewed and discussed separately and the final price is a subject to negotiation.

Ispirer Migration Service

Ispirer Migration Service
PowerBuilder to Java

Get an Estimate

Benefits You Get

100% Automation

100% Automation

Due to the customization, the manual work after migration will be minimized or eliminated.

Flexible Pricing

Flexible Pricing

You pay for only what you need: prices depend on the scope and duration of your project.

Optimized Migration

Optimized Migration

You get an intelligent and maintainable code without using any middleware after conversion.

What Our Customers Say

"Beckman Coulter provided as much of the information as we could but there was a lot of functionality that we did not know. This is where Ispirer talents became apparent as they forensically reengineered functionality."

"We are now successfully running live on the new system, with the updated PB apps. I want to express my thanks to Ispirer team. You made this project a success!!! I was happy to work with you and would highly recommend Ispirer!"

"Because of Ispirer and MnMTK, our team was able to devote its time to build the infrastructure for new Java programs instead of spending time on converting code. The produced Java code met all our maintainability, readability and performance requirements."

"This approach was very successful avoiding any confusion at the first stage, and achieved high conversion rate in the end. The project was completed successfully, they say they couldn't make it without MnMTK 2017 and excellent extension support from lspirer."

"At the onset of the engagement the Ispirer MnMTK was expanded to meet the specific requirements of our migration prior to being delivered for our use. Once this phase of the project was complete we were provided with the expanded toolkit."

"We have found the Ispirer team to be knowledgeable and responsive and we have found the tooling to be flexible enough to be easily adapted to our coding conventions."

previous arrow
next arrow
Slider

Get in touch with us!

Have questions about migration from PowerBuilder to Java?

Contact us