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