Page 1 of 1

Log File as an attachment in Email

Posted: Mon Nov 25, 2013 5:08 am
by DSRajesh
Hi All,

In a job sequence there are 4 different job activities and each activity attached with Email notification activity for failed trigger.

we need to attach the datastage job log file with email notif

The format of the log file would be Jobname_Timestamp_item.txt where Jobname and timestamp will vary and how to get this file and attach in the in the Email notification activity.

Posted: Mon Nov 25, 2013 6:09 am
by ArndW
The email stage lets you specify a variable attachment file name, i.e. one that you can compute in a Routine-Activity.

Are you asking about how to create this log file in the job sequence?

Posted: Mon Nov 25, 2013 8:03 am
by DSRajesh
Hi Arndw,

I am using a routine in the job sequence which will create the log file and and attaching Email Notification Activity.

The File name convention is Jobname_Timestamp_item.txt
where jobname is changing based on the job activity from file is created.

I am looking for how to attach a particular log file based on the job failed.

How to pass the parameter in the attachement column of email notification activity.

Posted: Mon Nov 25, 2013 9:41 am
by DSRajesh
Hi All,

Looking forward for the sugession from any one.

Posted: Mon Nov 25, 2013 9:55 am
by ArndW
The simplest is that your routine (which is probably programmed as a function) returns the name of the file it created back to the job sequence. You can then access that return value and use it as your attachment name.

Posted: Thu Nov 28, 2013 5:45 am
by sirishds
Hi,

You may have to change your routine such that it would save the log file as per the requiredconvention.so that going forward you can directly attach the file By means of notification Activity.

Option 2: Hope the log file would be saved in the DSsrver.You can use UNIX commands to change the job convention as required then attach the file using notification activity.

Hope this should help.

Thanks,
Sirish.