Friday, May 2, 2008

MIGRATING TO POWERBUILDER 11

You can migrate a PowerBuilder application from any version of PowerBuilder directly to any later version.

Before you migrate to a later version, refer the below link.
http://www.sybase.com/detail?id=1032777

This document addresses changes between PowerBuilder 8.0 and PowerBuilder 11.1.
Migration Assistant Overview:

Migration Assistant tool accessible from File --> New Dialog --> Migration Assistant.
--> Identifies obsolete syntax in your application (By Type, By PowerBuilder version).
--> Reports each instance of obsolete features and provides recommended action.

Using the Migration Assistant:

The Migration Assistant scans PowerBuilder libraries (PBLs) and highlights usage of obsolete syntax, such as obsolete functions and events. Functions and events that become obsolete in a specific version of PowerBuilder still work in that version but may not work in future versions. If you plan to maintain an application in the future, it's best to use current syntax and events. You can use the Migration Assistant to scan PBLs that were created and saved in any version of PowerBuilder.
You choose the type of syntax to search for and the Migration Assistant generates a report that shows where the obsolete syntax is used and, if appropriate, suggests replacement syntax. You can print the report or save it to a file.
You can check for PFC, FUNCky, or PowerScript syntax that became obsolete in PowerBuilder 6, 7, 8, 9, 10 or 11. If you select Power Script and Version 11, the Migration Assistant also checks for usage of reserved words that have been added in PowerBuilder 11.

You can also perform a custom search by specifying the strings you want to search for in a text file. Each string you want to search for must be on a new line. You can specify a replacement string on the same line, separated from the search string by a tab character.

To use the Migration Assistant:

1. Select File>New to open the New dialog box, then select Migration Assistant on the Tool page.

2. On the Search for Syntax of Type page, specify the type of syntax to be verified and click Next.

3. If you selected PFC, FUNCky, or PowerScript syntax, the Migration Assistant can check for syntax that became obsolete in PowerBuilder Versions 6, 7, and/or 8. On the Select Versions page, specify which versions you want to check and click Next.
Or
If you selected Syntax in Custom File, specify the file on the Specify Custom Search File pageand click Next.

4. On the Specify Libraries to be Searched page, locate the libraries you want to search in the left pane, double-click them or drag them to the right pane, and click Next.

5. On the Ready to Search page, check that the search criteria are what you want and click Finish.
The Migration Assistant Search Results page displays the PBLs, objects, and lines of code where obsolete syntax was found and shows the suggested replacement syntax, if any.

6. Modify your code to use current syntax.

Migrate Application Dialog Box:

Description: Migrates the selected application libraries to the current version of PowerBuilder.
Dialog Options:

Browse
Click OK to search for additional libraries that you want to migrate. You can select and delete libraries from the list of those to be migrated. Libraries that aren't in the application search path will not appear in the list of libraries to be migrated. You can open the Application painter and select an application with a search path that contains the libraries you want to migrate or modify the library search path of the current application.

Messages
If any errors or warnings messages are generated, they are displayed. You can choose to display informational and obsolete messages.

Information
Check if you want to see informational messages about the migration. You can save this information to a file or send it directly to a printer.

Obsolete
Check if you want to see messages about obsolete code in your application. Obsolete code uses constructs that will not be available in a future release of PowerBuilder.

Framework Upgrade (PFC):

If your applications uses PFC framework, you have to migrate PFC libraries to the latest version.

The latest versions of PFC libraries are available at
htttps://powerbuilder.codexchange.sybase.com/

You can migrate the PFC application workspace alone, or just replacing old PFC libraries with the new one.

SQL Server Native Driver:

SQL Server native driver (MSS) has been removed from PowerBuilder version 10.
PowerBuilder 11 includes a new interface (SNC) to support SQL Server 2000 & 2005. This interface is similar to the Microsoft OLE DB interface, but it uses Microsoft’s new OLE DB driver dedicated to SQL Server 2005. With this interface, PowerBuilder applications will be able to leverage the new features provided by the Microsoft SQL Server 2005 database.

If you are using old SQL Server native driver to connect to your database, you should change your code to connect to SNC driver. The change is simple one.

Before PowerBuilder Version 10 SQLCA.DBMS = “MSS”

From PowerBuilder version 11 SQLCA.DBMS = “SNC”

Deployment:

SQL Server Native Driver:
SQL Server Native Driver (SNC) should be deployed at client side. The SNC driver can be downloaded from,

http://download.microsoft.com/download/4/4/D/44DBDE61-B385-4FC2-A67D-48053B8F9FAD/sqlncli.msi

This installation will create a registry entry and copy the following files into your system folder.

* sqlncli.dll
* sqlnclir.rll
* sqlncli.chm


Runtime Libraries:

PowerBuilder 11 Runtime Packager can be used to deploy your runtime libraries for DOTNET framework. This tool is available at “Local Drive:\Program Files\Sybase\Shared\PowerBuilder”.

For the normal deployment, the following libraries are important and should be there along with your application PBD.

* atl71.dll
* libjcc.dll
* libjutils.dll
* msvcp71.dll
* msvcr71.dll
* pbdpl110.DLL
* PBDWE110.DLL
* PBDWM110.DLL
* PBjvm110.DLL
* PBSHR110.DLL
* PBSNC110.DLL
* PBVM110.DLL

7 comments:

Irulpuravi said...
This comment has been removed by the author.
Forever said...

HI,
Please let me know how to connect direct(No using ODBC) to sqlserver 2005 by Powerbuilder code.
Now, I use powerbuilder version 10.2(Build 9731).
Thanks so much!

miguell said...

Very usefull article!

Milan said...

Suresh, have you ever connected MQ series from pb11?

if you can help me on that, I appreciate.

Milan

Millan said...

Its really so nice post. thanks for sharing all about PowerBuilder

twinkle said...

Lolita!!!!!!

Gr8!

I was facing a lot of problem with trailing spaces in char values and it made my day.

peterjonathan said...

The PowerBuilder migration services reaps the benefits of three-tier architecture for enterprise-class Quality of Service. It also converts your legacy applications to the current technology with any reinvestments.