The Below  script useful to compile multiple .fmb files from single script.

SCRIPT:

vi fmcmp.sh

#!/bin/bash
.  APPS_XXXX.env
LOGFILE=/d01/backup/fmcmp_`date +%d%b%Y`.log

function FCMD
{
j=”${i//.fmb}”
cd $AU_TOP/forms/US
frmcmp_batch userid=apps/XXXX module=$i output_file=$AR_TOP/forms/US/$j.fmx module_type=form batch=no compile_all=special >>$LOGFILE
}

function M
{
cd /d01/backup
cp $i $AU_TOP/forms/US
echo form $i moved to AU_TOP. >>$LOGFILE
}
### Add the required form files in /d01/backup to compile ###
cd /d01/backup

for i in `ls *.fmb`
do
cd $AU_TOP/forms/US
if [ -f “$i” ];
then
echo form file already present.. take a bkp copy. >>$LOGFILE
cd $AU_TOP/forms/US
mv $i $i”_DBA”`date +%d%b%Y`_bkp
M
FCMD
else
M
FCMD
fi
done

#Change the location as per env & please take necessary bkp and test this script in DEV before compile in PROD#

 

 

Recommended Posts

Start typing and press Enter to search