Batch Compile Script for Forms, Libraries, Menus, Reports


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.1
Information 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

 

WARNING:  The sample scripts in this article are provided for educational purposes only and are NOT supported by Oracle Support Services.  They have been tested internally and work as documented. We can not guarantee they will work in all possible configurations, so be sure to test thoroughly in your test environment.

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:  These scripts have been designed to run in the Bourne and Bash shells.

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

#UNIX Forms Compile 
#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

#UNIX Forms Compile 
#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

Note:  Unlike Forms 9.0.4, 10gR2 and 11g, 6i did not come with a .sh script. to set up the environment.  Therefore, you will have to set up your environment variables correctly (ORACLE_HOME, PATH, etc.) when running this script.  

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

#UNIX Forms Compile 
#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

Note:  For windows, both 10gR2 and 11g have the same name for the executable frmcmp.exe. Therefore, if you have both versions on your system it is imperative that your environment variables be set correctly to ensure you are compiling the intended version. See  bug 9026160.  All of these scripts assume that the correct ORACLE_HOME and PATH to the Forms executables are set up correctly before the scripts are run.


FORMS & REPORTS 11g/10gR2

::compile_forms.bat 
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

REM WINDOWS COMPILE FORMS 
::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

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

#UNIX Forms Library Compile
#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

#UNIX Forms Menu Compile
#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

#UNIX Forms 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

#UNIX 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/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值