# fax2
#
# This program will take the information that is passed to it from cadol and
# write it to temporary files that begin with the login name.
# This is simply an overflow from the fax1 program since the interface from
# CADOL to UNIX uses the R buffer and it was full on the pass from fax1
#
# -----------------------------------------------------------------------------
# CHANGE HISTORY SECTION :
#  Rel#    Date                    Description
#  ----- --------   -----------------------------------------------------------
# -----------------------------------------------------------------------------
# NOTE: fco is standard tag name for 'From Company'
#       fvn is standard tag name for 'From Voice Number'
#       ffn is standard tag name for 'From Fax Number'
#       tg1 is standard tag name for 'User Defined Tag 1 (The company address)'
#       tg2 is standard tag name for 'User Defined Tag 2 (The city, st, zip)'
#       cvr is standard tag name for 'Cover Page Name'
#       que is standard tag name for 'Queue Name'
#

# NOTE: Any extensions in capital letters are variables defined by CADOL
#       and not standard options in VSI*FAX

fco=${1:-""}
tg1=${2:-""}
tg2=${3:-""}
fvn=${4:-""}
ffn=${5:-""}
BATCHFLAG=${6:-"S"}
cvr=${7:-""}
que=${8:-"fax1"}

if [ "$cvr" = "" ]
then
	cvr="modern"
fi

if [ "$que" = "" ]
then
	que="fax1"
fi

echo $fco > ${VAE}/data/fax/tmp/${LOGNAME}_fco
echo $tg1 > ${VAE}/data/fax/tmp/${LOGNAME}_tg1
echo $tg2 > ${VAE}/data/fax/tmp/${LOGNAME}_tg2
echo $fvn > ${VAE}/data/fax/tmp/${LOGNAME}_fvn
echo $ffn > ${VAE}/data/fax/tmp/${LOGNAME}_ffn
echo $BATCHFLAG > ${VAE}/data/fax/tmp/${LOGNAME}_BATCHFLAG
echo $cvr > ${VAE}/data/fax/tmp/${LOGNAME}_cvr
echo $que > ${VAE}/data/fax/tmp/${LOGNAME}_que

# cp ${VAE}/data/fax/tmp/${LOGNAME}_* /versyss/data/tmp
