#!/usr/bin/ksh
#whatformserver ()
#-----------------------------------------------------------------------#
#    Module Name:  whatformserver                                       #
#                                                                       #
#    Purpose:      Report on the AppsTier Forms Server Version Details  #
#                  command:  $ORACLE_HOME/bin/frmcmp help=y             #
#                                                                       #
#                  Forms 10.1 (Form Compiler) Version 10.1.2.3.0        #
#                  Forms 10.1 (Form Compiler): Release                  #
#                                                                       #
#                  PL/SQL Version 10.1.0.5.0 (Production)               #
#                  Oracle Virtual Graphics System Version 10.1.2.0.0    #
#                  Oracle Procedure Builder V10.1.2.3.0                 #
#                                                                       #
#                  Oracle Multimedia Version 10.1.2.0.2                 #
#                  Oracle Tools Integration Version 10.1.2.0.2          #
#                  Oracle Tools Common Area Version 10.1.2.0.2          #
#                  Oracle CORE  10.1.0.5.0                              #
#                                                                       #
#    Maintenance                                                        #
#    Date          Author        Description                            #
#    -----------   ------------  -------------------------------------  #
#    12-May-2012   M.Barone      Module design/creation                 #
#-----------------------------------------------------------------------#
{
        DIRNAM=$(dirname $0)
        ORASID=$(echo $CONTEXT_NAME | cut -f1 -d'_')
        HNAME=$(uname -n)

        clear
        #---------------------------------------------------------------#
        #  TEST:  Number ($#) of arguments passed to this function?     #
        #---------------------------------------------------------------#
        if      [ $# = 0 ]
        then
            clear
            echo
            echo  " #--------------------------------------------------#"
            echo  " # whatformserver:    AppsTier Forms Server Version #"
            echo  " #--------------------------------------------------#"
            echo

            echo  " Connecting as AppsTier Owner"
            sleep 2

            clear
        else
            SEARCH=$1
            clear
        fi

        ORANAM=${ORASID}

#------------------------------------------------------------------------#
#  Initialize                                                            #
#------------------------------------------------------------------------#

#------------------------------------------------------------------------#
#  Unix/Linux/AIX Command                                                #
#------------------------------------------------------------------------#
        echo
        echo  "#--------------------------------------------------------#"
        echo  "# whatformserver:   Oracle AppsTier Forms Server Version #"
        echo  "#--------------------------------------------------------#"
        echo

        $ORACLE_HOME/bin/frmcmp help=y  tee /tmp/whatformserver_$$.txt

print
print  "Please see  /tmp/whatformserver_$$.txt"
print
}

