Monday, 26 January 2015

Shell Script to Generate XML ldt File for XML Template and Send an Email



#!/bin/ksh
# $Header: $
#---------------------------------------------------------------------------------------------------
#  File name       : XXERPCLDT
#  Author          : ERPC Team
#  Created         : Oct 10, 2012
#
#  Description     : Shell to Generate the ldt Script for XML Template  and Email
#
#---------------------------------------------------------------------------------------------------
#  Date        Author        Version  Reason
#---------------------------------------------------------------------------------------------------
#  10/01/2015  ERPC Team        1.0      Initial creation
#---------------------------------------------------------------------------------------------------
CPSN=$5 #Concurrent Program Short Name
email=$6 #Email to send the Ldt file
LDTFILE=$XXAMW_TOP/bin/$CPSN.ldt
touch sub.txt
FNDLOAD $1 O Y DOWNLOAD $XDO_TOP/patch/115/import/xdotmpl.lct $LDTFILE XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME="XXAMW" DATA_SOURCE_CODE=$CPSN TMPL_APP_SHORT_NAME="XXAMW" TEMPLATE_CODE=$CPSN
mutt -s "Concurrent Program" -a  $LDTFILE -c prasad.bheemavarapu@oracle.com -- $email < sub.txt

cat $LDTFILE

No comments:

Post a Comment