I have a basic 3 'stage' job sequence.
1) Job Activity - Executes a DS job that creates a TXT file containing an integer which represents the identifier of the just completed nightly batch run (works fine)
2) Routine Activity - Reads the integer from the above file (works fine) and, if the number is anything > 0, it goes to:
3) Notification Activity - Sends an email stating the nightly batch run has completed.
My 'issue' is in step 3... it works fine as is but I want to customize the email by including the actual value of the identifier (mentioned in steps 1 and 2) in both the SUBJECT and BODY of the email message...
I have tried assigning the value to user status, return value, using a job parameter, etc) but when the email is produced, whatever variable I have tried to use, is always blank...
Anyone have any thoughts???...
Thanks...
Chuck
Passing Variables within a Job Sequence
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 342
- Joined: Tue Nov 04, 2008 10:38 am
- Location: Chennai, India
-
- Premium Member
- Posts: 425
- Joined: Sat Nov 19, 2005 9:26 am
- Location: New York City
- Contact:
Chuck,
Sustitute the step 3 - the email notification - with a server job, inside the server job use DSSendMail
This routine allows the body to be a parameter. The arguments are { To address, From address, Subject line, Server name, Message body }
So the body could be anything that you conform in the job. Just play around with it. We have a lot of nice formatted emails with this routine
Regards
Sustitute the step 3 - the email notification - with a server job, inside the server job use DSSendMail
This routine allows the body to be a parameter. The arguments are { To address, From address, Subject line, Server name, Message body }
So the body could be anything that you conform in the job. Just play around with it. We have a lot of nice formatted emails with this routine
Regards
Julio Rodriguez
ETL Developer by choice
"Sure we have lots of reasons for being rude - But no excuses
ETL Developer by choice
"Sure we have lots of reasons for being rude - But no excuses
After my initial post, I discovered that the email body does not accept parameters (Parallel sequence) and instead simply inserts the hasehd parameter (e.g., #ParamName#)... so your suggestion to use a Server job will hopefully solve that part... I just have very little Server job experience...
The problem I'm having is that the parameters I've been trying to use are empty... I was able to use $jobstatus and $jobname just to test what I was trying to do and those values do show up... however, I do not know how or see any way to take advantage of $userstatus... all the posts talk about writing a routine, or writing BASIC code, or icluding something called DSSETUSERSTATUS()... none of which I've ever done... guess I will have to learn...
The problem I'm having is that the parameters I've been trying to use are empty... I was able to use $jobstatus and $jobname just to test what I was trying to do and those values do show up... however, I do not know how or see any way to take advantage of $userstatus... all the posts talk about writing a routine, or writing BASIC code, or icluding something called DSSETUSERSTATUS()... none of which I've ever done... guess I will have to learn...