Search This Blog

Thursday, April 28, 2011

Compile Oracle forms,reports etc. on Unix

#!/bin/ksh
#
EXE=/home/oraclefrm/OraHome_1/forms/bin
SRC=/home/oraclefrm/OraHome_1/forms/src
print "######################################################################################"
print "Compile individual components for forms 10.1.2.0.2 on Linux and Solaris"
print "Before start ensure you have database schema name, password and the connection string"
print "######################################################################################"
print "Compile Form press [1]"
print "Compile Menu press [2]"
print "Compile Library press [3]"
print "Compile All Forms press [4]"
print "Compile ALL ( Forms,Libraries and Menus) [5]"
print "For Exit press [0]"
read answer
case $answer in
1)
print "Database schema"
read schema
print "Schema password"
read schema_pass
print "Connection string"
read connection
print "Write the form name"
read form_name
frmcmp_batch.sh userid=$schema/$schema_pass@$connection batch=yes module=$form_name module_type=Form
;;
2)
print "Database schema"
read schema
print "Schema password"
read schema_pass
print "Connection string"
read connection
print "Write the Menu name"
read menu_name
frmcmp_batch.sh userid=$schema/$schema_pass@$connection batch=yes module=$menu_name module_type=Menu
;;
3)
print "Database schema"
read schema
print "Schema password"
read schema_pass
print "Connection string"
read connection
print "Write the Library name"
read library_name
frmcmp_batch.sh userid=$schema/$schema_pass@$connection batch=yes module=$library_name module_type=Library
;;
4) print "Database schema"
read schema
print "Schema password"
read schema_pass
print "Connection string"
read connection
for i in `ls *.fmb`; do
frmcmp_batch.sh userid=$schema/$schema_pass@$connection batch=yes module=$i output_file=$EXE module_type=Form
done
;;
5) print "Database schema"
read schema
print "Schema password"
read schema_pass
print "Connection string"
read connection
print " Compiling libaries .."
for i in `ls *.pll`; do
frmcmp_batch.sh userid=$schema/$schema_pass@$connection batch=yes module=$i output_file=$EXE module_type=Libary
done
for i in `ls *.fmb`; do
frmcmp_batch.sh userid=$schema/$schema_pass@$connection batch=yes module=$i output_file=$EXE module_type=Form
done
for i in `ls *.mmb`; do
frmcmp_batch.sh userid=$schema/$schema_pass@$connection batch=yes module=$i output_file=$EXE module_type=Menu
done

;;
*)
exit 0
;;
esac