File Date

Hi Team ,

My query is I have generate the two flat file swift_frontoffice_party20170413.csv . swift_trans_fofc_party20170413.csv
with business date on daily bases and the Zip the Two flat file and written script to sent mail
The date value in the flat file will be changed according to the Business date.

How can the pass business date to the script and the Zip the two files .

The script I have written

set -x
echo "Sending mail "
FILE_DATE=$(date +"%Y%m%d")------this is system date ...but I need the business date as a parameter file
cd /app/informatica/data/GC_AML_MTSDM_DEV01/TgtFiles
zip EMAIL_TRANS_TRANP.zip swift_frontoffice_party$FILE_DATE.csv swift_trans_fofc_party$FILE_DATE.csv
echo "zip completed"
mailx -s " testing " XXXXXX@gmail.com << EOM
`uuencode EMAIL_TRANS_TRANP.zip EMAIL_TRANS_TRANP.zip`
echo "mail completed"

Could u pls help in writing the script .

If you told people in here what the "business date" is, how it is created, and where it can be found (in a parameter file (name? location?) maybe?), you might find some decent help.

EDIT: Or, reading your post again, should it be that data part of the respective file names?

We are Using ETL tool to generate the business date like 20170708 along with flatfile swift_frontoffice_party20170413.csv

 -rw-rw----+ 1 mtsdsdev mtsdsd  18918303 Apr 24 06:27 swift_frontoffice_party20170413.csv
-rw-rw----+ 1 mtsdsdev mtsdsd      1940 Apr 24 06:27 swift_trans_fofc_party20170413.csv

I have written script without date for the flatfile it is working fine with script I have written

 -rw-rw----+ 1 mtsdsdev mtsdsd   4734570 Apr 24 06:23 swift_trans_fofc_party.csv
-rw-rw----+ 1 mtsdsdev mtsdsd  12621265 Apr 24 06:23 swift_frontoffice_party.csv

When I am using the business date with the flatfile which will be changing on daily bases

My Query is the I have to sent the two flatfile in a mail the with attached in a Zip file .
the Flafile like these

 -rw-rw----+ 1 mtsdsdev mtsdsd  18918303 Apr 24 06:27 swift_frontoffice_party20170413.csv
-rw-rw----+ 1 mtsdsdev mtsdsd      1940 Apr 24 06:27 swift_trans_fofc_party20170413.csv