We have the legacy application built with PB7. It ran on VM with Windows 10 , 64 bits. We want to upgrade PB7 to PB 2019. We moved the code to another virtual machine and installed PB 2019, and tried to open pbl files , but there is nothing happened when I clicked open button. I ran PB 2019 as administrator. Also, PB 7 and database were not install on a new VM machine yet. My question is that do I need to install PB7 first then installing PB 2019 ? Why I cannot open the pbl files on PB 2019 ? Please advice.
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- Cannot open library files (PBL) with PB 7 on PB 2019
- Kelvin Doan
- PowerBuilder
- Friday, 20 August 2021 16:49 PM UTC
- Tuesday, 24 August 2021 13:06 PM UTC
- PowerBuilder
- # 1
Hi Chris. I followed your instruction steps. I used "Migration Assistant" tool of PB 2019 with result "No New, obsolete or removed syntax found". That's good ! but when I migrated the PB7 libraries to PB 2019, I got some errors about syntax. Do I need to recompile the code on PB7 before migration ? However, the libraries still migrated to PB2019 although there are some errors. Then I tried to full build work space, I got some errors but when I click the errors the message popped up "Open of user object xxxxx failed. It has been migrated to current version format but must also be successfully regenerate" . I regenerated object, it has the same problem. Do you have any ideas. I appreciate for your advice.
- Friday, 20 August 2021 21:53 PM UTC
- PowerBuilder
- # 2
Hi Kelvin;
I have PB apps back to version 1.0 and in-between. I use these to test every new Appeon PB migration from these lower PB versions.
First of all before you migrate anything to PB2019Rx, please run the "Migration" utility in PB 2019 on your PB 7 Application libraries (PBLs) to see if there are changes to the PB 7 App code that need to be done before you migrate in the PB 7 IDE.
Next, "optimize" all your PBLs in the PB 7 IDE. The PB IDE has a habit of leaving "ghost" object definitions in a PBL. The optimize step will remove these so that they do not accurately inhibit the PB 2019 migration step.
The next step is to copy all of your PB 7 App to a new folder. Never migrate a "live" version of any app in case this step blows up & you cannot recover your app in any PB version.
The next step is to create a new "Workspace" object from the PB 2019 IDE into your new copied PB 7 App folder.
The final step is to then create a new Native Application Target but make sure that you choose the "Existing" PB 7 Application, and it's existing PBLs. This should then have the PB 2019 prompt you to migrate. Answer yes and then let the IDE complete this step. Once the migration step is complete, you should now be able to view your App's source code. HTH
Regards ... Chris
- Friday, 20 August 2021 21:41 PM UTC
- PowerBuilder
- # 3
Hi John;
That won't work because you would now have two Application Objects and even if you force a migrate, most likely the compile will fail as the PB 7 App object has global variables set that the rest of the PB App needs.
Regards... Chris
- Armeen Mazda @Appeon
- Sunday, 22 August 2021 21:42 PM UTC
-
Helpful Loading... Helpful 0
- John Fauss
- Sunday, 22 August 2021 22:55 PM UTC
The first documentation snippet was copied/pasted from here:
https://docs.appeon.com/pb2019r3/upgrading_pb_apps/ch20s01.html
The second copied snippet source I quoted is from here:
https://docs.appeon.com/pb2019r3/upgrading_pb_apps/ch03s02.html
Thank you!
-
Helpful Loading... Helpful 0
- Friday, 20 August 2021 19:51 PM UTC
- PowerBuilder
- # 4
Here's one suggestion:
1) Made a copy of your code at the parent folder level. This will be the WORK folder.
2) Get to a valid PB2019 target and COPY the target file (the .pbt file) into the WORK folder
3) Open the PBT file in NotePad and modify it to point to the code in the WORK forlder.
Save.
Close.
4) Open PB2019. Open a workspace where you have a valid PB2019 application.
5) Add the new faked-out target fril from your WORK folder into the currently open PB2019 workspace.
6) The migration tool should popup. Populate the PBL list correctly, check everything, and migrate the app.
7) If there are no errors, do a FULL BUILD on the new target.
This should, I say SHOULD,, get the PB7 code into PB2019. It's possible you will need to correct errors, and do another FULL BUILD. I've had to do up to five FULL BUILDs until the migrated app works and runs.
Good Luck!
- Friday, 20 August 2021 19:41 PM UTC
- PowerBuilder
- # 5
My earlier reply was ALMOST, but not entirely correct. According to the online documentation:
https://docs.appeon.com/pb2019r3/upgrading_pb_apps/ch20.html
"To add a target to your workspace that uses an application built in PowerBuilder 7 or earlier, use the Existing Application Target (my emphasis) wizard on the Target page of the New dialog box. After you complete the wizard, the Migrate Application dialog box opens, allowing you to migrate the application to PowerBuilder 10. For information about using workspaces and targets, see Chapter 1 in the User's Guide."
Once the app has been migrated to PB 10:
https://docs.appeon.com/pb2019r3/upgrading_pb_apps/ch03s02.html
"The Migrate Application dialog box opens automatically after you open a workspace that contains PowerScript targets built using an earlier version. If you add a PBT containing such PBLs to an open workspace, or add PBLs built in an earlier version of PowerBuilder to a target's library list, the Migrate Application dialog box does not open automatically. To open the dialog box, select each target that contains PBLs created using earlier versions of PowerBuilder in the System Tree and select Migrate from the pop-up menu."
I hope this helps you out.
- Friday, 20 August 2021 19:11 PM UTC
- PowerBuilder
- # 6
Thank you John. As you said , I create a new workspace and new target, also I can add old PB 7 libraries under new target. However, I cannot open to see the code when I click PB7 libraries. Nothing is happened. Any ideas ?
- Friday, 20 August 2021 18:26 PM UTC
- PowerBuilder
- # 7
you can't even look at anything from a pre version 10 pbl on a post version 10 PB. that was a huge mistake on SAP/sybase part, we should be able to at least export old stuff from within new versions. Maybe Roland can build us a utility to do that.
you can migrate it which may or may not be the best as it is all or nothing.
you can export objects from within pb 7 to the sr* files, then import those to PB 2019. that works best if you don't need everything and still have pb 7
- mike S
- Friday, 20 August 2021 18:48 PM UTC
-
Helpful Loading... Helpful 0
- Roland Smith
- Sunday, 22 August 2021 14:49 PM UTC
-
Helpful Loading... Helpful 0
- Friday, 20 August 2021 17:51 PM UTC
- PowerBuilder
- # 8
PB 7 pre-dates the use of Workspaces (.pbw) and Targets (.pbt) objects. PB 2019 only works with libraries that exist within a workspace and target. It's been a LONG time since I worked with PB7 or migrated a pre-version 8 app, but I think what you need to do is:
Create a new Workspace in PB 2019, then a new application target. This will create one PBL (library) and a new application object in that PBL. In the System Tree pane, right-click the (new) target and select Library List... from the popup menu. Add all of the PB7 PBL's (make a backup copy of the PB7 libraries first!).
The application will then run through version migration.
Anyone else in the Community is welcome to correct or add to these steps.
Best regards, John
- Armeen Mazda @Appeon
- Friday, 20 August 2021 18:38 PM UTC
-
Helpful Loading... Helpful 0
- Page :
- 1
However, you are not allowed to reply to this question.
Sounds like you have made good progress. You should now be at least able to look at the App's source code in the PB2019 IDE!
For the current error(s) you described, it sounds like the object that you are trying to open has an ancestor that is also in error and thus cannot be opened as well. Check out the ancestor that its referring to and then try a "regenerate" on that ancestor in the System Tree using the mouse RMB. Once the ancestor is OK, then the object you were initially trying to open should now also open.
Note: You can always look at the source code via the "Edit Source" option for any object class.
Regards ... Chris