Batch Compile Script. for Forms, Libraries, Menus, Reports and Conversion between Binary and Text [ID 955143.1] | |||||
| |||||
修改时间 22-DEC-2009 类型 HOWTO 状态 PUBLISHED |
In this Document
Goal
Solution
SCRIPTS FOR UNIX
SCRIPTS FOR WINDOWS
Applies to:
Oracle Forms - Version: 6.0.8.26.0 to 11.1Information in this document applies to any platform.
Forms 11g, 10gR2, 10g and 6i
Goal
This document contains sample Unix and Windows scripts that can be used to batch compile Forms Modules (Forms, Libraries or Menus) and Reports Modules.Solution
Please note the following concerning these scripts:
a. These scripts require read privileges in the source and destination directories. The way the scripts are written, the source and destination directories are the same.
b. The scripts should be placed in the same directory as the forms modules (.fmb, pll, mmb, etc. files) and reports (.rdf files) that you wish to generate. The generated files for forms (.fmx, plx, mmx, etc. files) and reports (.rdf) files will be created in the same directory.
c. When creating or copying the scripts be sure that no carriage returns or line feeds exist in the list of parameters for the executables. If you simply cut and paste these scripts from this note into a text editor there is a chance extra carriage returns or line feeds will be inserted. If this happens, the scripts will NOT run.
d. When ftping the scripts, be sure to do so in ASCII mode.
SCRIPTS FOR UNIX
Note 2: If you don't wish to use the X-Display then you can use frmcmp_batch.sh, f90gen, or f60gen (depending on your version) when compiling Forms. Make sure TERM, ORACLE_TERM and NLS_LANG values are properly set.
FORMS & REPORTS 11G/10gR2
#compile_forms.sh
for i in `ls *.fmb`
do
echo Compiling Form. $i ....
frmcmp_batch.sh userid=scott/tiger@v11g batch=yes module=$i module_type=form. compile_all=yes window_state=minimize
done
#UNIX COMPILE REPORTS
#compile_rep.sh
for i in `ls *.rdf`
do
echo Compiling Report $i ...
rwconverter.sh userid=scott/tiger@v11g batch=yes source=$i stype=rdffile dtype=repfile verwrite=yes compile_all=yes
done
FORMS 9.0.4
#compile_forms.sh
for i in `ls *.fmb`
do
echo Compiling Form. $i ....
f90gen.sh userid=scott/tiger@v817 batch=yes module=$i module_type=form. compile_all=yes window_state=minimize
done
FORMS & REPORTS 6i
The easiest way to verify it will work is to attempt to compile a specific form. in non-batch mode prior to running the script. For example ->
f60gen userid=scott/tiger@v817 module= module_type=form. compile_all=yes
#compile_forms.sh
for i in `ls *.fmb`
do
echo Compiling Form. $i ....
f60gen userid=scott/tiger@v817 batch=yes module=$i module_type=form. compile_all=yes window_state=minimize
done
#UNIX COMPILE REPORTS
#compile_rep.sh
for i in `ls *.rdf`
do
echo Compiling Report $i ...
rwcon60 userid=scott/tiger@v817 batch=yes source=$i stype=rdffile type=repfile verwrite=yes compile_all=yes
done
SCRIPTS FOR WINDOWS
FORMS & REPORTS 11g/10gR2
cls
Echo compiling Forms....
for %%f IN (*.fmb) do frmcmp userid=scott/tiger@v11G module=%%f batch=yes module_type=form. compile_all=yes window_state=minimize
ECHO FINISHED COMPILING
REM WINDOWS COMPILE REPORT
::compile_report.bat
cls
Echo compiling Report .....
for %%f IN (*.rdf) do rwconverter userid=scott/tiger@v11G batch=yes source=%%f stype=rdffile DTYPE=REPFILE compile_all=yes VERWRITE=yes logfile=log.txt
ECHO FINISHED COMPILING
FORMS 9.0.4
::compile_forms.bat
cls
Echo compiling Forms....
for %%f IN (*.fmb) do ifcmp90 userid=scott/tiger@v817 module=%%f batch=yes module_type=form. compile_all=yes window_state=minimize
ECHO FINISHED COMPILING
FORMS & REPORTS 6i
REM WINDOWS COMPILE FORMS
::compile_forms.bat
cls
Echo compiling Forms....
for %%f IN (*.fmb) do ifcmp60 userid=scott/tiger@v817 module=%%f batch=yes module_type=form compile_all=yes window_state=minimize
ECHO FINISHED COMPILING
REM WINDOWS COMPILE REPORT
::compile_report.bat
cls
Echo compiling Report .....
for %%f IN (*.rdf) do RWCON60 userid=scott/tiger@v817 batch=yes source=%%f stype=rdffile DTYPE=REPFILE OVERWRITE=yes logfile=log.txt
ECHO FINISHED COMPILING
ADDITIONAL USES
The scripts can be modified to convert libraries (.pll files) and menus (.mmb files) to executables - .plx and . mmx files respectively. Here are two examples for 11g and 10gR2 on UNIX:
Libraries
#compile_lib.sh
for i in `ls *.pll`
do
echo Compiling Libraries $i ....
frmcmp_batch.sh userid=scott/tiger@v11g batch=yes module=$i module_type=LIBRARY compile_all=yes window_state=minimize
done
Menus
#compile_menu.sh
for i in `ls *.mmb`
do
echo Compiling Menus $i ....
frmcmp_batch.sh userid=scott/tiger@v11g batch=yes module=$i module_type=MENU compile_all=yes window_state=minimize
done
The scripts can also be used to convert Forms between binary and text. Here are two examples:
Converting a Form. to Text
#convert_to_text.sh
for i in `ls *.fmb`
do
echo Converting $i ....
frmcmp userid=scott/tiger@v11g batch=yes module=$i module_type=FORM. script=YES window_state=minimize
done
Converting a Form. from Text to Binary
#convert_to_bin.sh
for i in `ls *.fmt`
do
echo Converting $i ....
frmcmp module=$i userid=scott/tiger@v11g parse=YES batch=yes window_state=minimize
done
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24067357/viewspace-673205/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24067357/viewspace-673205/