1. Kelvin Doan
  2. PowerBuilder
  3. Friday, 20 August 2021 16:49 PM UTC

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.  

John Fauss Accepted Answer Pending Moderation
  1. Friday, 20 August 2021 19:41 PM UTC
  2. PowerBuilder
  3. # 1

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.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 20 August 2021 17:51 PM UTC
  2. PowerBuilder
  3. # 2

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

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 20 August 2021 18:38 PM UTC
Thanks for educating us John!
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Friday, 20 August 2021 18:26 PM UTC
  2. PowerBuilder
  3. # 3

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

Comment
  1. mike S
  2. Friday, 20 August 2021 18:48 PM UTC
also, you don't need the same version of pb to export stuff. just one that can open the pbl. so if you have pb 9 you can export pb 3 stuff.
  1. Helpful
  1. Roland Smith
  2. Sunday, 22 August 2021 14:49 PM UTC
I'm thinking 'New Target From Existing' would be the way to go.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Sunday, 22 August 2021 14:53 PM UTC
Yep! ;-)
  1. Helpful
There are no comments made yet.
Kelvin Doan Accepted Answer Pending Moderation
  1. Friday, 20 August 2021 19:11 PM UTC
  2. PowerBuilder
  3. # 4

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 ? 

Comment
  1. mike S
  2. Friday, 20 August 2021 19:59 PM UTC
you have to migrate
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Friday, 20 August 2021 19:51 PM UTC
  2. PowerBuilder
  3. # 5

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!

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 20 August 2021 21:41 PM UTC
  2. PowerBuilder
  3. # 6

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

Comment
  1. Armeen Mazda @Appeon
  2. Sunday, 22 August 2021 21:42 PM UTC
Hi John, Please point out where you saw this and we will fix. Thanks!
  1. Helpful
  1. John Fauss
  2. Sunday, 22 August 2021 22:55 PM UTC
Hi, Armeen! Glad to oblige...

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!
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Monday, 23 August 2021 04:15 AM UTC
Thanks John!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 20 August 2021 21:53 PM UTC
  2. PowerBuilder
  3. # 7

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

Comment
There are no comments made yet.
Kelvin Doan Accepted Answer Pending Moderation
  1. Tuesday, 24 August 2021 13:06 PM UTC
  2. PowerBuilder
  3. # 8

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. 

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 24 August 2021 14:00 PM UTC
Hi Kelvin;

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
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.