Converting to Oracle Forms 10g

Caution: Raised your eyebrows with this notice? You should be. Why? Because, this is not a sure-shot method for converting your old forms to new version. If you are having more number of forms, you should try this method with a hand-full of forms first. Make sure that this works, and then proceed to your full set of forms for conversion. The conversion is a complex task, dealt with as a simple task in this article. I believe in breaking up of the complex task into multiple simple chunks which can be managed easily. So beware of estimating the conversion. Always keep a BIG buffer time for your conversion activities as it is NOT AN EASY TASK.

In this article we will go through methods to convert an earlier version of Oracle Forms to Oracle Forms 10g Version. Here we are going to discuss a method through batch file provided by Oracle.

In the <ORACLE_HOME>\BIN folder there is a batch file named frmplsqlconv.bat. In this batch file it is calling a Java class to search and replace values found in older form for enabling the conversion.

The following is the line by which the actual conversion is done:

<ORACLE_HOME>\jdk\bin\java -Dsun.java2d.noddraw=true -DCONVERTER_DEFAULTS=<ORACLE_HOME>\forms\converter.properties -DSEARCH_REPLACE_FILE=<ORACLE_HOME>\forms\search_replace.properties oracle.forms.util.wizard.Converter %*

The file converter.properties contains some default properties of the converter class. The file search_replace.properties contains strings to be replaced in the new converted version of form.

This is the default search and replace functions handled in the search_replace.properties file:

###########################################################################

# The set of search and replace strings

# Each of these are in the form SearchString|ReplaceString

# Users can add their own set of search and replace strings at

# the end of this block

###########################################################################

Replace1=ROLLBACK_FORM|CLEAR_FORM(NO_COMMIT,FULL_ROLLBACK)

Replace2=ROLLBACK_NR|CLEAR_FORM(NO_COMMIT,FULL_ROLLBACK)

Replace3=ROLLBACK_RL|CLEAR_FORM(NO_COMMIT,FULL_ROLLBACK)

Replace4=OHOST|HOST

Replace5=MENU_CLEAR_FIELD|CLEAR_ITEM

Replace6=MENU_FAILURE|FORM_FAILURE

Replace7=MENU_MESSAGE|MESSAGE

Replace8=MENU_NEXT_FIELD|NEXT_ITEM

Replace9=MENU_PREVIOUS_FIELD|PREVIOUS_ITEM

Replace10=MENU_SHOW_KEYS|SHOW_KEYS

Replace11=MENU_SUCCESS|FORM_SUCCESS

Replace12=OS_COMMAND|HOST

Replace13=OS_COMMAND1|HOST

Replace14=:UN|GET_APPLICATION_PROPERTY(USERNAME)

Replace15=:PW|GET_APPLICATION_PROPERTY(PASSWORD)

Replace16=:LN|GET_APPLICATION_PROPERTY(USER_NLS_LANG)

Replace17=:AD|GET_FORM_PROPERTY(NAME_IN('SYSTEM.CURRENT_FORM'),FILE_NAME)

Replace18=:SO|:SYSTEM.TRIGGER_MENUOPTION

Replace19=RUN_PRODUCT|RP2RRO.RP2RRO_RUN_PRODUCT

Replace20=CHANGE_ALERT_MESSAGE|SET_ALERT_PROPERTY

Replace21=BREAK|DEBUG.SUSPEND

Replace22=DISABLE_ITEM|ENABLEDISABLEITEM.REPLACEDISABLEMENU

Replace23=ENABLE_ITEM|ENABLEDISABLEITEM.REPLACEENABLEMENU

One can add any other function (user-defined) in this list by specifying ReplaceNN (replace NN with running sequence numbers).

There is also an option to provide group of built-ins for which warnings are to be given by specifying a alternate built-in to use if the occurrence is a Forms procedure. The default section contains the following:

WarnOnlyBuiltIn.Message=The String %s was found. If it is an occurrence of the Forms Built-In, It should be replaced with %s.

WarnOnlyBuiltIn.WarnOnly1=CALL|CALL_FORM

Then create a batch file with all your old form modules name like:

REM Start Compiling

::convert_to_forms10g.bat

cls

Echo Compiling Forms....

for %%f IN (*.fmb) do frmplsqlconv module=%%f userid=xx/xx log=%%forms_conversion.log

for %%f in (*.pll) do frmcmp userid=xx/xx module=%%f module_type=LIBRARY batch=yes window_state=minimize compile_all=yes

for %%f in (*.mmb) do frmcmp userid=xx/xx module=%%f module_type=MENU batch=yes window_state=minimize compile_all=yes

for %%f in (*.mmb) do frmcmp userid=xx/xx module=%%f module_type=FORM batch=yes window_state=minimize parse=YES

for %%f in (*.mmb) do frmcmp userid=xx/xx module=%%f module_type=FORM batch=yes window_state=minimize script=YES

for %%f IN (*.fmb) do frmcmp userid=xx/xx module=%%f batch=yes module_type=form compile_all=yes window_state=minimize

ECHO Finished Conversion...Check for log file for details

11 comments :

  1. Anantha,

    this is really good one.can u explain about images(*.ico) to work in forms10g

    ReplyDelete
  2. Sorry for replying so late., what is that you are looking for to work with icons, Feel free to email me at tlananthu@gmail.com

    ReplyDelete
  3. Thanks it;s working .....

    ReplyDelete
  4. That covers roughly 50% of it. There are actually over 150 commands affected depending on what version you start from. And yours is only good from version 6i or higher.

    Might want to look into a tool like PITSS.CON that covers hundreds of commands and also allows you to identify things that need to be recoded (DDE, VBX, OLE Containers, etc). It is important to let people know that it isn't that easy.

    www.pitssamerica.com

    ReplyDelete
  5. Hi Anantha,
    Thanks for the information. I have about 150 version 6i forms to convert to 10g. I wanted to ask you if the forms migration assistant would do most of the conversion without many issues and once the forms migration assistant completes, we should compile the forms in the 10g environment and fix them if any errors come. Will the migration assistant itself error due to some reason. Can you please let me know how much time you think it would take for 150 forms to be converted using forms migration assistant and then compiled. Thanks a lot. I would really appreciate your help.

    With Regards,
    Satish.

    ReplyDelete
  6. It depends on the forms and its functionalities. But I have not tried any such number of forms conversion. The migration assistant will list out the errors while migrating and/or compilation issues while compiling the forms to new version.

    Thanks & Regards,
    Anantha

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. hi anatha ,

    I am using forms 6i with ole container which is now obsolete with 10g. I know there is a way u can still work around with WEBUTIL library.
    if you can give me a sample fmb where by i can upload the word or pdf or xls document inside the 10g fmb will be gr8 for me to centralize this module. i am saving this documents in longraw column in database.

    my email id is sltrivedi@gmail.com

    ReplyDelete
  9. Hi,

    see this link.
    http://www.oracle.com/technology/products/forms/htdocs/webutil/howto_ole.html

    ReplyDelete
  10. Hi Anatha Can you Help I had made One Form in 10g and saved it and compiled it and it was perfectly working but when i am opening this form next day it was not opening and 10g form builder shuts down. i using this on window 10. thanks in advance
    DINESH BHATIA (DINESH_BHATIA@HOTMAIL.COM)

    ReplyDelete
    Replies
    1. Open Forms Builder. Connect to DB. Open the Form. It should open now. If it doesn't then see if you have access to WIN XP machine and open in it.

      Thanks,
      Anantha

      Delete