I have recently inherited a PowerBuilder 10.5.1 application that was originally created with PB5 with PFC and migrated. Before I purchase PB2021, will this application migrate to the newest version of Appeon PB2021?
Here are some tips that I compiled back when we migrated from PBv8 to PBv9.
FYI: This thread entry can also be found at:
Subject: PB9 Migration & Issue
Migrating to PB9
I have 7 applications already in production under PB 9. Had to tweak the
code a little here and there, but they are all working super! In your case
with the Shared PFC's libraries, what I would do to migrate your
applications would be ...
1) Run the "Migration Assistant" on your Application FIRST! Note any
potential problems as you might have to fix a few things in PB 7 before you
continue with the migration!
2) Create a "migration" folder.
3) Copy the new PFC's from PB 9 to the new folder.
4) Create a Dummy Workspace and Target application and include the PB 9
PFC's and the applications PFE layer.
5) In the System Tree (or Library Painter) use the RHMB on the Target and
Note: Remember to copy any specific "global" variables from your real
application's global variable definitions.
6) Copy your specific application libraries to the migration folder.
7) Create a new Target object and choose "Existing" application .. then
select your real Application Object.
Note: Set the library path to include the "Migrated" PFC and PFE libraries.
8) Run the "Migration" setup again. This time it will be allot faster as PB
knows that the PFC and PFE objects are already of the PB 9 flavour!
Repeat the above steps for each application. This is the safest method I know to get a clean migration.
Here are three sections of information.
From the Newsletter just sent out by Olivier -
10 Tips For Migrating Applications to PowerBuilder 9.0
by Lee Cheetham, Sybase Professional Services Consultant
1) Use the Migration Assistant to
identify obsolete functions and events.
The Migration Assistant scans
PowerBuilder libraries to detect potential
problems with syntax prior to migrating
the application. Obsolete Syntax is
available from version 6 onwards. The
Migration Assistant can be found on the
"Tool" tab of the "New" object dialogue
2) PSR files, if an application attempts to
open a PSR file created in an earlier
version of PowerBuilder (pre 8.0 build
7063 or pre 7.0 build 10102) it will fail.
This is due to a change in the
SaveAsASCII function. To fix this problem,
recreate the PSR in a later build of
3) New reserved words (Try, Catch,
Finally, Throw, Throws) were introduced
in PowerBuilder 8.0 for exception
handling. The Migration Assistant will
identify any occurrences of these
reserved words. To fix this problem,
change all the instances of "Try, Catch,
Finally, Throw, Throws" in your application
to alternative names using a previous
version of PowerBuilder.
4) Distributed programming support
has been discontinued since PowerBuilder
8.0. The "Transport" object has become
obsolete. The application events
"connectionbegin" and "connectionend"
no longer get fired. The solution is to
deploy your server side NVOs to EAServer.
5) SystemError Event processing has
changed between PowerBuilder 7 and
the later versions of PowerBuilder. In
PowerBuilder 7, when an error occurs the
"SystemError" event is triggered, after the
"SystemError" event processing has
completed, control is returned to the
script where the error occurred. In
PowerBuilder 8 and 9, when an error
occurs the call stack is unwound, then the
"SystemError" event is triggered, after the
"SystemError" event processing has
completed, processing does NOT continue
at the point where the error occurred.
Catch and handle errors locally using the
new exception handling functionality
available in PowerBuilder 8 and 9.
6) IsValid function was changed in
PowerBuilder 8 to return "FALSE" if the
object is not instantiated or an invalid
object has been passed, prior to version
8, if an invalid object was passed the
"SystemError" event would be triggered.
7) Windows no longer inherit the
Application Icon, you must now code or
set the property to "AppIcon!"
8) TreeView Event, the "rbuttonup!"
event no longer fires, this was introduced
in PowerBuilder 7.
9) ListView, the "pbm_rbuttonup!"
event no longer fires when rightclicking
on a ListView item, but it does fire if you
click on the white area in the ListView.
The solution to this is to use the new
"pbm_contextmenu!" event, which
always fires when the right mouse button
10) Web Targets, that use the
WebDataWindow control must be
modified to use the new
HTMLGenerator90 component. Right click
on the Web DataWindow Design Time
Control on your web page and select
properties. On the "HTML Generator" tab
change the reference from
HTMLGenerator80 to HTMLGenerator90.
After changing the HTMLGenerator, the
database connection properties are
sometimes lost, so it is important to
check the "Connection" tab and ensure
that the database connection setting is
still correct after the change.
From a previous post by Shekar
You must 'replace' the PFC libraries with those
from PowerBuilder 9 to start with. However, if
you are not using the PFE libraries that came
with PowerBuilder 9 due to your own customizations
to the e-level or an intermediate corp-layer
(I hate intermediate corp-layers inserted between
PFC and PFE), here are some issues to address:
Blow off all the OBSOLETE objects from PFC/PFE.
Inherit all the NEW objects in PFC into PFE/corp-layer.
On graphic files:
> Another issue while migrating from PowerBuilder 6.5
> to PowerBuilder 9 is that the compiler in
> PowerBuilder 7 and above needs to validate the
> existence of the graphic files. In PowerBuilder 6.5,
> the compiler continues compilation even if the file
> is not found but in v7 and above, we get warnings
> and even the compilation may stop abruptly because it
> cannot find the graphic file.
On Saving to PDF:
You must install Ghostscript v7.05 onto your PC and on to all client PCs.
Ghostscript on PowerBuilder 9 works if you include
the "bin" subfolder of Ghostscript in the System-Path:
My Computer -> Properties -> Environment Vars...
For instance, if you installed Ghostscript in c:\gs,
you would include c:\gs\bin in the system-path.
Assuming that you are using the distill method, I have found that you need
to install GhostScript on each machine for registry entries, then assuming
that pbdwe90.dll is in the "...\Shared\PowerBuilder" directory, create a
directory called drivers and copy the files, such as pscript*.* and
adist5*.* from your ...\Shared\PowerBuilder\drivers directory to the new
drivers directory, then make sure the GhostScript bin directory (...
\Shared\PowerBuilder\gs7.05\bin) is in the path.
Perhaps quoting the PB documentation is more understandable... "When you
deploy applications that use the ability to save as PDF using the distill
method, you must deploy the gs7.05 and drivers directories in the same
directory as the pbdwe90.dll runtime file." What the document does not
say, but should is that you have to have the bin directory in the path.
A way that I did some minor testing to see of GhostScript is available is
to type gswin32.exe from a MS DOS prompt and see if there are any errors.
You can type quit to get out. I do not know any other commands.
PB9 Bug - sort by LookUpDisplay is slow
We had some problems with datawindows sorting by LookUpisplay.
It worked really slow (at run time) in PB 9 but was quite fast
in PB 6 through 8. This occurred only when using sort by
LookUpDisplay where the drop-down used was big (over 1000 rows).
On deploying web datawindows
Check out this link
Hope This Helps -
Converting PB5 to PB9 requires retesting of ur application!!!!! So its a
good time to substitute the PFC layer to PFC Version 9.
I can't exactly remember the changes in PFC to version 8, but are some
differences---Bugfix, some minor add-ons and changes to take advantage ot
the new functions PB8 and PB9
i.e changes to contextmenu
>From: "borisulcar" <email@example.com>
>I am converting a PB5 app which used PFC to PB 9. Were there many
>changes to PFC since then? I am a bit apprehensive in substituting
>the PFC classes, since we might have to retest the whole application
>to make sure it works the same. I have heard that PFC has not had
>much changes since PB6.5, due to the whole PFC team disbanding (is
>that true?) What have others done in these cases? I would appreciate
>your experiences and comments.
Thank you all for your responses. I will update this post once I get a chance to download a trial version of PB2021 and migrate.
There have been a number of deprecated objects in the PFC since v5. You will most likely not get a good migration of that code. Hopefully you haven't used any of the deprecated code so you can eliminate them until you get a good migration - then switch to the newer pfc libraries.
Here is the PB 2021 upgrade guide: https://docs.appeon.com/pb2021/upgrading_pb_apps/index.html
I would also recommend watching this video first: https://www.appeon.com/developers/library/videos/migrating-powerbuilder-2018.html
But since you are on 10.x, my guess is the upgrade should be fairly simple and the biggest change might be swapping the old PFC libraries with the latest ones: https://github.com/OpenSourcePFCLibraries
Thank you so much for your response.
I am assuming that the PB2017 docs apply to PB2021?
There were many changes to the PFC since version 5. You can try a straight auto-migration and then test the App to see if it runs OK with that very old PFC release. If not, I would then look at updating the PFC as well ( https://github.com/OpenSourcePFCLibraries ).
Regards ... Chris
- Page :
However, you are not allowed to reply to this question.