Thursday, November 24, 2016

EBS 12.2 -- Using GSCC in 12.2 Upgrades, using frmcmp_batch and ( is already missing)

Nowadays, we have started doing EBS 12.2 upgrades. I'm sure about it, because I currently have on-going EBS upgrade projects and there are upgrade related questions asked in my forum, as well.(

This blog post will be based on one of these questions recently asked in my forum.
It was related with GSCC (Global Standards Compliance Checker), that we are using in our upgrades for ensuring our filesystem and db objects are compatible with the new EBS 12.2 release.

The instructions for using GSCC is documented in "Using the Online Patching Readiness Report in Oracle E-Business Suite Release 12.2 (Doc ID 1531121.1)".

When we look to that note, we see that there are for steps given as instruction and those 4 steps are all about running sql files.

However, we look carefully, we see that, the same note also gives us the readme of "R1222: STANDALONE READINESS REPORT AND GLOBAL STANDARDS COMPLIANCE CHECKER (GSCC)", wich actually gives us the necessary info that describes how to the the GSCC ( for checking our filesystem objects.


Using GSCC
The Global Standards Compliance Checker (GSCC) delivered in this patch consists
of the main, engine script $FND_TOP/bin/ and a variety of standards
enforcement code (EFC) modules in $FND_TOP/perl/GSCC/OpenEFC/ that check for
common standards issues.
After applying this patch to install the GSCC code, source the applications
environment file and then run the GSCC on a set files under a directory tree
like this:
cd /home/yourdir
$FND_TOP/bin/ -f '/home/yourdir/your-code/*'
In this example, will check all of the files located under the
your-code/ directory using the EFC modules located in
$FND_TOP/perl/GSCC/OpenEFC/ and generate a report named gscc-out.log in the
current working directory (/home/yourdir/ in this example). Invoking without arguments will print a usage message with additional

So, in addition to the 4 steps outline in the document 1531121.1, we need to use to check our filesystem objects (forms, reports etc..) for ensuring that they are compatible with the new EBS release.(to ensure custom code complies with E-Business Suite (EBS) online-patching coding standards.)

However, we can't use directly with forms (maybe reports as well) . That is, for instance we can't give fmb files as input to and this is why I m writing this blog post.

While just doesn't do anyting when given an input fmb files in some of the EBS 12.2 versions, it just gets error in some other versions, as shown below.

cd $XX_TOP/forms/US
$FND_TOP/bin/ -f XXOEXXX.fmb
The log file is :
more gscc-out.log
GSCC Compliance Test Results:
File: XXOEXXX.fmb

Configuration Errors (1):
0 - File conversion failed for
using the command line OVERWRITE=YES XXOEXXX.fmb
GSCC Totals:
Passes: 0
Fails: 0
Warnings: 0
Under Review: 0
GSCC Errors: 1

--* GSCC Compliance Test: Configuration Error *--

This error is caused by missing, as GSCC tries to use it internally.  (as seen in the above output: using the command line OVERWRITE=YES XXOEXXX.fmb )

Note that,  is not delivered with EBS.

One workaround for this can be taking it from an Client environment which has Oracle forms installed. (frm2xml is there when we have Oracle Forms)
So, we take the contents of the frmf2xml.bat (it is bat, since clients are generally on Windows) and convert it to Bash;

For example:
. $ORACLE_HOME/SID_host.env
export CLASSPATH=$CLASSPATH:$ORACLE_HOME/forms/java/frmxmltools.jar:$ORACLE_HOME/forms/java/frmjdapi.jar:$ORACLE_HOME/lib/xmlparserv2.jar:
for i in 'ls *.fmb'
java oracle.forms.util.xmltools.Forms2XML OVERWRITE=yes $i

So we can run this script for fmb files, get the xml files created and then give that xml files to the for validation.
However, this method has a problem. The problem is that, this java converter can crash when the fmb files are big. (too big:)

Fortuneatly, there is another & more efficient way and it is based on using frmcmp_batch.
The following script can be put on the directory, where the fmb files that we want to check reside and executed to get the whole gscc output in one go.

Note that, this script can be modified for using with the other types(such as rdf) as well;
It processes the filesystem objects one by one.. It produces one final gscc_log which includes all the gscc checks for fmb files.

for i in $(ls *.fmb);
echo $i
frmcmp_batch module=$i userid=apps/apps Script=YES Forms_Doc=YES module_type=FORM
$FND_TOP/bin/ -f `echo $i | sed '{s/.fmb/.txt/g; }'` -o gscc_`echo $i | sed '{s/.fmb/.log/g; }'`
echo "GENERATING GSCC OUTPUT --all FMBs together" > gscc_log
for i in $(ls *.log);
echo ---- GSCC OUTPUT FOR $i ----- >> gscc_log
cat $i >> gscc_log

Once we get it working, we will see violations in the gscc output, similar to the following..
When we get the violations, we send them to developers to make them fix them.

File: XXXXX_fmb.xml

Errors (1):
File.Gen.41 (Code Reviewers: CODE_REVIEWER)
516 - Potential standards violation found in Query/DML. Please check whether
is a direct table reference. If so, change it to use the APPS synonym.
516 - Potential standards violation found in Query/DML. Please check whether
is a direct table reference. If so, change it to use the APPS synonym.

File: XXXX_fmb.xml

Errors (1):
File.Gen.41 (Code Reviewers: CODE_REVIEWER)
814 - Potential standards violation found in Query/DML. Please check whether
is a direct table reference. If so, change it to use the APPS synonym.

Again, this was an issue reported in my forum and thanks "Linda" for pointing this out.

No comments :

Post a Comment